# [SOLVED] #NAME? Error with DATEDIF Formula



## tomohawk (Dec 29, 2009)

Using Excel 2010 and get #NAME? error as follows

Cell C2 contains 30/01/1954 - (formatted DATE)
Cell E2 contains =TODAY() - (formatted DATE)
Cell G2 contains formula =DATEDIF(C2,E2,Y) - (formatted NUMBER)
Cell G2 displays result = #NAME?


----------



## falcon291 (Oct 17, 2013)

*Re: #NAME? Error with DATEDIF Formula*

are you sure that there is a datedif formula?

If you need the days, just simply subtract the dates, get the integer part. If you need working days instead you can use networkdays formula?

Hope it helps.
Serdar,


----------



## tomohawk (Dec 29, 2009)

*Re: #NAME? Error with DATEDIF Formula*

Yes Serdar,

I'm sure.

I want to calculate how old somebody is in years only. So the same formula should have two different answers. One calculated before the date of birth and one after


----------



## Elkar (Mar 17, 2008)

*Re: #NAME? Error with DATEDIF Formula*

You need to use quotes around the Y.

=DATEDIF(C2,E2,"Y")


----------



## tomohawk (Dec 29, 2009)

*Re: #NAME? Error with DATEDIF Formula*

Many thanks Elkar.

Problem solved.

T


----------

