Calculating Date Formula

JABWootton

Board Regular
Joined
Dec 16, 2004
Messages
94
Office Version
  1. 2019
Platform
  1. Windows
I have 2 colums with Dates in them.
The Date in Column 1 reads Jan 04 Apr 04 Dec 04 etc..
The Date in Column 2 reads Dec 06 Jan 07 etc..
I ned a Formula that calculates the the number of months between the first date in column 1 eg Jan 04 and the last date in column 2
I know I can do it manually but I have over 1000 rcords to do
Thanks
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Problem is that "months" have a variable number of days (28, 29, 30 or 31), so you cant define a month.

Depending on how accurate you need the result to be, you could simply subtract the dates and divide by (365/12) and use a round function to convert to a whole number.



HTH


:cool:
 
Upvote 0
Do you know where the dates are or do you need to find them?

Assuming you know where the first date is in column A (in A1) but you have to find the last date in column B

=DATEDIF(A1,LOOKUP(9.99999999999999E+307,B:B),"m")

will give you the number of whole months between the dates
 
Upvote 0
If you want difference in months between the corresponding cells of the two cols: use MONTH(B1)-MONTH(A1).

By `last date in column 2', if you mean the last row in col2 use:

=DATEDIF($A$1,INDEX(C4:C6,MATCH(9.99999999999999E+307,C4:C6)),"M")
 
Upvote 0
Column A Column B Column C

Start Finish Duration

Feb-02 Sep-07 Need the Total No of Months between Col A and B
Oct-04 Sep-07
Feb-02 Jun-06
Oct-04 Sep-07 If i did it manually this Cell would read 36
Sep-03 Sep-06
 
Upvote 0

Forum statistics

Threads
1,215,772
Messages
6,126,806
Members
449,337
Latest member
BBV123

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