compare months

  • Thread starter Thread starter troy
  • Start date Start date
T

troy

i need a formula that will say something like this:

if the month of the date in cell a1 = the month of the
date in cell a2 then a2-a1 else g9=0

thanks in advance for the help

Troy
 
Troy,

This formula in cell G9 will return the result you are seeking.

=IF(Month(A1)=Month(A2),A2-A1,0)

PC
 
Back
Top