Subtracting 2 dates

D

Dave

Birthday = 5/1//1946

I am using a formula to get the age of a person =(TODAY()-Birthday). This
returns a number 22272. I know that I can format that number and return the
correct year - 60. But I want to calculate off of that number. I am doing
an IF this year = certain age, I will get a certain text script.

But my formula does not see the =(TODAY()-Birthday) as a 60. How do I show
an age in years that can be calculated from?

Thanks

Dave
 
B

Bob Phillips

=DATEDIF(Birthday,TODAY(),"y")

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
S

Stratful

Hi Dave,

If you use the following formula to calculate the age it will return a value
in years:

=ROUNDDOWN((TODAY()-A2)/365.22,0)

You should then be able to do an IF function on this value.

All the best

Paul
 
D

Dave

Thank you - that did the trick!!

Dave


Bob Phillips said:
=DATEDIF(Birthday,TODAY(),"y")

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)
 
Top