DATEDIF result in years and months - duplicate

HerbsG

New Member
Joined
Sep 5, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I need to create a mark book.

=VLOOKUP(G3,'Yr5 Maths Aut'!$A$1:$U$112,MATCH(I3,'Yr5 Maths Aut'!$A$1:$U$1,0),0)

  • The Vlookup table uses the following Ages 9 yrs 1 month, 9 yrs 2 months etc to 9 yrs 10 months.
Total
9.00
9.10
9.20
…..
9.90
9.10
9.11
10.00
10.1


The problem is: =DATEDIF(D7,$E$1,"Y")&"."&DATEDIF(D7,$E$1,"YM")

When using the formula to compare Date of Birth to current date (today's date), the value returns 9.1.

e.g - I get two 9.1 results!

Start dateEnd dateResult
19/06/2011​
05/09/2020​
9.2
19/07/2011​
05/09/2020​
9.1
19/10/2010​
05/09/2020​
9.10
Is there a way to return 9.01 for 9 years 1 month?

Then read the table

Total
9.00
9.01
9.02
…..
9.09
9.10
9.11
10.00
10.01
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try

=DATEDIF(D7,$E$1,"Y")&"."&TEXT(DATEDIF(D7,$E$1,"YM"),"00")

You might need to use G3+0 in the lookup formula depending on how the lookup table is formatted.
 
Upvote 0
Try

=DATEDIF(D7,$E$1,"Y")&"."&TEXT(DATEDIF(D7,$E$1,"YM"),"00")

You might need to use G3+0 in the lookup formula depending on how the lookup table is formatted.
Many thanks..
I have tried =DATEDIF(D3,$E$1,"Y")&" Years "&DATEDIF(D3,$E$1,"YM") &" months"
returns the value
9 Years 2 months

The vlook up reference table is now
9 Years 1 months9 Years 2 months9 Years 3 months9 Years 4 months


This now works - many thanks

 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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