Hi dear friend
first sorry for my bad English
I collect information of about 18000 pationts to analysis. for my study i need age of them. but I have only birth date of them. I want "automatically" not one bye one convert that dates to age for each patient. by bellow formula i can do that one bye one!
=ROUNDDOWN(YEARFRAC(B2, TODAY(), 1), 0)
I think B2 should automatically change to B3,B4,... to B18000
PLEASE HELP ME
THANKS![]()
Last edited by rahvar77; 02-21-2011 at 02:18 PM. Reason: solved
Try this
Drag/Fill Down=DATEDIF(B2,NOW(),"y")
Hope this helps
[EDIT]
Use the handle (small square bottom right of cell) to drag the formula down.
This will increment the cells automatically.
Your formula seems to work okay.
Is that what you mean by automatic?
Last edited by Marcol; 02-21-2011 at 08:09 AM. Reason: Clarification requested.
If you need any more information, please feel free to ask.
However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
Also
If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.
DATEDIF is better to get an accurate age as most people would understand it, i.e. it increments by 1 each birthday, using ROUNDDOWN with YEARFRAC can give inaccurate results on the birthday itself, e.g. in this formula
=ROUNDDOWN(YEARFRAC(DATE(1992,6,20),DATE(2011,6,20), 1), 0)
the two dates are exactly 19 years apart but the formula returns a result of 18
Audere est facere
A method I use to show the current age, calculated from DoB is as follows (a bit lengthy, but works!)...
=DATEDIF($G2,NOW(),"y") & "y,"&DATEDIF($G2,NOW(),"ym") & "m,"& DATEDIF($G2,NOW(),"md") & "d"
This shows the age as (for example) 54y,3m,21d when the DoB is in column G. Again, the formula can be filled-down to calculate for a sheet of data.
Hope it helps!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks