Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

odd or even

Status
Not open for further replies.

wmbb

Technical User
Jul 17, 2005
320
NL
How do I check if row number of the selected cell in excel is odd or even ?
 
a starting point:
Code:
If ActiveCell.Row Mod 2 Then
  MsgBox "active row is odd"
Else
  MsgBox "active row is even"
End If

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thnx, this works perfect !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top