View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] acharya.kalpesh@gmail.com is offline
external usenet poster
 
Posts: 1
Default Odd or Even numbers (VBA for Excel)

I am trying to write a VBA Function code to highlight Odd and Even numbers. But not having much luck. Can anyone help me, please?

I would like to use the following condition to highlight a cell:

=AND(ISODD(A1), A1<24) for Low-Odds
=AND(ISODD(A1), A124) for Low-Evens
=AND(ISEVEN(A1), A1<23) for High-Odds
=AND(ISEVEN(A1), A123) for High-Evens