Excel Macro Help
Author
Discussion

Nevin

Original Poster:

2,999 posts

292 months

Sunday 3rd December 2006
quotequote all
Looking for some help. I have an Excel sheet which has the dates of birth of a number of people in it in the following format: DD/MM/YYYY

I would like to have a column showing their age which automatically updates as their birthdays pass etc, so I don't have to sit and work it all out manually every time I want to check.

Any thoughts much appreciated.

FunkyGibbon

3,863 posts

295 months

Sunday 3rd December 2006
quotequote all
the datediff function is your friend...

www.meadinkent.co.uk/xl_birthday.htm

Nevin

Original Poster:

2,999 posts

292 months

Sunday 3rd December 2006
quotequote all
Okay, I'm trying something like this:

=DATEDIF($A$1,NOW,"Y"

and its bringing up something like $NAME?. So where do I go from here? And can I apply the formula to the entire column rather than having to do each individual cell? Sorry, years since I have done functions on Excel.

FunkyGibbon

3,863 posts

295 months

Sunday 3rd December 2006
quotequote all
Nevin said:
Okay, I'm trying something like this:

=DATEDIF($A$1,NOW,"Y"

and its bringing up something like $NAME?. So where do I go from here? And can I apply the formula to the entire column rather than having to do each individual cell? Sorry, years since I have done functions on Excel.

syntax needs to be

=DATEDIF($A1,NOW(),"y"

note:

a) the lack of a $ before the 1 - this means you can copy the formula down the whole column, by clicking on the cell and dragging the square on the bottom right hand corner of the cell
b) the now function needs to be now()
c) make sure the cell format for the column with dates in is set to a Date format.

good luck.

FG

Nevin

Original Poster:

2,999 posts

292 months

Monday 4th December 2006
quotequote all
Excellent, sorted now. Cheers.