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

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

I assume this will go in G9.
 
Troy,

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

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

PC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top