Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is going to sound really lame but I'm having trouble with the coding of
an even or odd number check. I have a simple routine that loops through data starting at "A1" and stops when the data breaks and counts the number of lines there were. I need a statement to tell me if that number was odd and then exit the sub. This should be easy to with any coding knowledge. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you could use a counter and then when you're done, use the mod function
If counter Mod 2 = 1 Then MsgBox "it's odd" Else MsgBox "it's even" End If -- Gary "xadnora" wrote in message ... This is going to sound really lame but I'm having trouble with the coding of an even or odd number check. I have a simple routine that loops through data starting at "A1" and stops when the data breaks and counts the number of lines there were. I need a statement to tell me if that number was odd and then exit the sub. This should be easy to with any coding knowledge. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel 2007 chart data label - several lines put highest number ove | Charts and Charting in Excel | |||
How to evaluate a 'dotted' number using formulae (not UDF) | Excel Worksheet Functions | |||
Why won't Sumproduct funciton evaluate this data | Excel Worksheet Functions | |||
evaluate data by week number | Excel Worksheet Functions | |||
Need a macro to evaluate and sift-through data | Excel Programming |