compare month and year in a date

  • Thread starter Thread starter Afia
  • Start date Start date
A

Afia

I have 2 date columns and i need to compare the month and year only,

for example: column a = 31/12/2009 and column 2 is 12/12/2009, the result
should be true
 
I have 2 date columns and i need to compare the month and year only,

for example: column a = 31/12/2009 and column 2 is 12/12/2009, the result
should be true

=and(month(a1)=month(b1),year(a1)=year(b1))

or, less intuitive but shorter:

=(a1-day(a1))=(b1-day(b1))



--ron
 
Another:

=text(a1,"yyyymm")=text(b1,"yyyymm")


I have 2 date columns and i need to compare the month and year only,

for example: column a = 31/12/2009 and column 2 is 12/12/2009, the result
should be true
 

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

Datedif gives wrong result 1
sum and count text and numbers same column 1
SUMIF 1
FORMULA NEEDED FOR MONTHS 1
IF or vlookup formula 8
Sort Issue 2
Date issues 1
How do I compare the stored data in micro 3

Back
Top