# HELP WITH COMPARING IF STATEMENTS FOR DATES

#### owendodd

##### Board Regular
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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
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.

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

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?

try: =IF(OR(G2="",J2=""),"",IF(MONTH(G2)=MONTH(J2),"complete","incomplete"))

Cheers it work grand, many thanks for the help!

Replies
5
Views
130
Replies
24
Views
282
Replies
0
Views
318
Replies
5
Views
264
Replies
7
Views
312

1,196,152
Messages
6,013,750
Members
441,781
Latest member
Gian Carlos

### 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.

### Which adblocker are you using?

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

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