Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Evaluate an odd number of data lines

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Evaluate an odd number of data lines

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel 2007 chart data label - several lines put highest number ove Sue Charts and Charting in Excel 1 May 31st 08 12:58 PM
How to evaluate a 'dotted' number using formulae (not UDF) Alan Excel Worksheet Functions 10 April 13th 06 07:19 PM
Why won't Sumproduct funciton evaluate this data [email protected] Excel Worksheet Functions 1 March 8th 06 07:56 PM
evaluate data by week number Steve G Excel Worksheet Functions 1 July 7th 05 09:34 PM
Need a macro to evaluate and sift-through data Ronny Hamida[_2_] Excel Programming 2 May 25th 04 09:13 PM


All times are GMT +1. The time now is 08:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"