Formula Needed for Dates

bri_nin

New Member
Joined
Jun 4, 2015
Messages
2
I have 2 dates, Reported Date & Paid Date. I need to find out if they are in the same month, the following month, etc. So in the next column, I need the output to be a Zero if paid in the same month, 1 if paid in the next month, 2 if paid 2 months later, 3 if paid 3 months later, etc. I have it figured out to give me a zero if paid in the same month by using this: =IF(MONTH(E2)&YEAR(E2)=MONTH(F2)&YEAR(F2),0,"NO") E2 being the Reported Date & F2 being the Paid Date, but I cannot figure out how to get it if it's not the same month. Please help!

THANKS IN ADVANCE!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Welcome to the Board!

Try this (assuming column F is the later of the two dates):
Code:
=MONTH(F2)-MONTH(E2)+(YEAR(F2)-YEAR(E2))*12
 
Upvote 0
Thanks! That is way more simple than what I had written up! (LOTS of IF statements within another IF statement!) Looks like it worked on my sample sets. Thank you so much!

This may be my new favorite site! :)
 
Upvote 0
I was going to suggest with an error check:
=IFERROR((YEAR(F2)*12+MONTH(F2))-(YEAR(E2)*12+MONTH(E2)),)
 
Upvote 0

Forum statistics

Threads
1,203,601
Messages
6,056,209
Members
444,850
Latest member
dancasta7

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