JLeMasonry
New Member
- Joined
- Jan 21, 2017
- Messages
- 3
I am compiling a database featuring many different people. I need to be able to list their dates of birth, dates of death, and ages. So far, I have split these into three columns, E, F and G respectively, but I am having some trouble with the "Age" column. I need this column to do two things, if possible: if the person in question is alive, to list their current age at any given date, and if the person is dead, to list the age at which they died.
So far, my function for this column looks like this:
=IF([@DOD]>$B$1,DATEDIF([@DOB],$B$1,"y"),IF([@DOD]<$B$1,"Died"))
(B1 in this case is the specific date which will be changed accordingly.)
I feel like something needs to be added to the second IF function, to qualify that, if this function is true, the formula needs to work out the difference between DOD and DOB and display that as an age, but all my attempts to make this work have failed.
I appreciate that my formula is probably quite archaic and not altogether the most helpful formula in the world for this task, so any advice or suggestions would be appreciated!
So far, my function for this column looks like this:
=IF([@DOD]>$B$1,DATEDIF([@DOB],$B$1,"y"),IF([@DOD]<$B$1,"Died"))
(B1 in this case is the specific date which will be changed accordingly.)
I feel like something needs to be added to the second IF function, to qualify that, if this function is true, the formula needs to work out the difference between DOD and DOB and display that as an age, but all my attempts to make this work have failed.
I appreciate that my formula is probably quite archaic and not altogether the most helpful formula in the world for this task, so any advice or suggestions would be appreciated!