HELP WITH COMPARING IF STATEMENTS FOR DATES

owendodd

Board Regular
Joined
Jan 17, 2005
Messages
205
Hello i am tyring to find a way in excel to compare that both these dates are equal. I want to say that if both have the month Jan, wat formula under the IF command would say this is true.
05-Jan-04 -----(G2)
Jan-04 ---------(J2)
Ur help would be appreciative!
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
owendodd said:
Hello i am tyring to find a way in excel to compare that both these dates are equal. I want to say that if both have the month Jan, wat formula under the IF command would say this is true.
05-Jan-04 -----(G2)
Jan-04 ---------(J2)
Ur help would be appreciative!

Try,

=IF(MONTH(G2)=MONTH(J2),1,0)

Assuming both dates are true date values.
 
Upvote 0
Or :-

=MONTH(G2)=MONTH(J2)

Or to cover the possibilty that one or both of the cells are not empty (so that an empty cell is not taken to be January) :-

=((G2<>"")*(J2<>"")<>0)*(MONTH(G2)=MONTH(J2))>0
 
Upvote 0
Cheers for that but wat i want to know now is that from this formula iget a true and false answer. I want the words complete and incomplete used instead. Any ideas how to change true or false?
 
Upvote 0

Forum statistics

Threads
1,214,805
Messages
6,121,664
Members
449,045
Latest member
Marcus05

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top