Checking which row is selected

  • Thread starter Thread starter John in Wembley
  • Start date Start date
J

John in Wembley

Hi

I have some simple VB wich is going to paste 7 rows of a template
report into a sheet.
The nurse is going to be able to paste a blank reporting template
before another to keep them in alpabetical order...

I need to know that the activecell is multipliers of 8 eg a8 or b16 or
d24 a32 etc etc so they can run the macro to paste the 7 rows plus one
row as space into the report without overlaping the pervious report

how could I do this? I was pondering if I could devide the number eg
32 and get a true / false
As long as it was true I know its a mulitplier of 8
any other idears?

cheers
JOhn
 
Use MOD:

Sub sonic()
n = Application.InputBox("enter a number: ")
If n Mod 8 = 0 Then
MsgBox ("divisible by 8")
Else
MsgBox ("not divisible")
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top