leopardhawk
Well-known Member
- Joined
- May 31, 2007
- Messages
- 611
- Office Version
- 2016
- Platform
- Windows
Regarding this formula:
If there are dates in E8 (September 23, 1953) and H8 (April 1, 2017) the formula is returning "Started pension at 63 years and 6 months of age.". This is good.
If both cells are blank, the formula is returning "Started pension at 0 years and 0 months of age." which is also good.
However, for practical purposes, there will be situations where H8 will be blank and if it is, then I am receiving a #NUM ! error.
What I am trying to accomplish is that the formula should also return "Started pension at 0 years and 0 months of age." if H8 is blank. Is this possible?
Thanks!
If there are dates in E8 (September 23, 1953) and H8 (April 1, 2017) the formula is returning "Started pension at 63 years and 6 months of age.". This is good.
If both cells are blank, the formula is returning "Started pension at 0 years and 0 months of age." which is also good.
However, for practical purposes, there will be situations where H8 will be blank and if it is, then I am receiving a #NUM ! error.
What I am trying to accomplish is that the formula should also return "Started pension at 0 years and 0 months of age." if H8 is blank. Is this possible?
Code:
="Started pension at "&DATEDIF('personal information'!E8,'personal information'!H8,"y")& " years " &DATEDIF('personal information'!E8,'personal information'!H8,"ym")&" months of age."