Months Count

KrisCz

New Member
Joined
Nov 1, 2021
Messages
11
Office Version
  1. 2019
Platform
  1. Windows
Hi Guys,
I went through forum but couldn't find similar issue, I am not great excel user but tried to search solution via google as well, but don't know how to phrase it correctly.
I hope someone will be able to help, I created formula which counts months from current date =(YEAR(W2)-YEAR(H2))*12+MONTH(W2)-MONTH(H2)
My current date is in "W2" and I would like to formula to have "W2" when I drag formula down(which is in "I2" but it changes to "W3", "W4" and so on as normally it is needed like that.
Is there a way to use data only from W2 without manually overwriting every fomula or dragging current date down?

Thanks in advance

Tracker Insurance.xlsx
DEFGHIJKLMNOPQRSTUVW
201/02/20202101/11/2021
301/05/2021-1456
410/06/2019-1433
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
20
Sheet1
Cell Formulas
RangeFormula
W2W2=TODAY()
I18,I16,I14,I2:I12I2=(YEAR(W2)-YEAR(H2))*12+MONTH(W2)-MONTH(H2)
I13,I19,I17,I15I13=(YEAR(W12)-YEAR(H13))*12+MONTH(W12)-MONTH(H13)
Cells with Data Validation
CellAllowCriteria
G2:G20ListIssued, Underwriting, Postpned, Lapsed, Declined, Cancelled, Awaiting Start Date,
K2:K20ListYes, No
U2:U20ListYes, No
P2:P1048576ListIndemnity, Non-Indemnity
Q2:Q1048576ListYes, No
E2:E1048576ListLife, Critical Illness, Life & CIC, Income Protecion
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hi & welcome to MrExcel.
You need to anchor the row number for W2 like
Excel Formula:
=(YEAR(W$2)-YEAR(H2))*12+MONTH(W$2)-MONTH(H2)
 
Upvote 0
Hi & welcome to MrExcel.
You need to anchor the row number for W2 like
Excel Formula:
=(YEAR(W$2)-YEAR(H2))*12+MONTH(W$2)-MONTH(H2)
Thanks, that was super quick, will that anchor works with other types of furmulas?
I had the same problem in the past when I had value in a2 and had to drag it down every time when I changed value in a2 cell.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
One more thing, How to keep cells empty in "I" column until i put value in "H"?
1635859293598.png
 
Upvote 0
How about
Excel Formula:
=IF(H2="","",(YEAR(W$2)-YEAR(H2))*12+MONTH(W$2)-MONTH(H2))
 
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,619
Members
449,238
Latest member
wcbyers

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