![]() |
Checking which row is selected
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 |
Checking which row is selected
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 -- Gary''s Student - gsnu2007 "John in Wembley" wrote: 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 |
All times are GMT +1. The time now is 02:54 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com