View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
salgud salgud is offline
external usenet poster
 
Posts: 219
Default Validate same month and same year

Got help here figuring out the formula to validate that 2 dates in another
cell (not the one with the validation formula) were for the same month. I
now need to validate they are both the same month and year.
I've tried:
=MONTH(H7)=MONTH(I7)and=year(H7)=year(I7)
which XL doesn't accept. I tried
=(MONTH(H7)=MONTH(I7))and(year(H7)=year(I7))
but that doesn't work either.
Any suggestions?