Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I've acquired this formula from the Excel 2002 Formula book by John
Walkenbach but I want to extend it's features by rounding it off. The formula is as follows: =DATEDIF(G7,H7,"y") & " years, " & DATEDIF(G7,H7,"ym") & " months, " & DATEDIF(G7,H7,"md")+1 & " days" G7 = 1/11/2006 H7 = 31/10/2016 The result is 9 years, 11 months, 31 days What I want it to do is round it to 10 years. The reason why I can't just go =DATEDIF(G7,H7,"y") & " years" is because in the same spreadsheet the row above it is: G7 = 1/03/2006 H7 = 15/11/2006 The result is 0 years, 8 months, 15 days. I guess the best option would be to create a VBA function which calls the datediff function? Any suggestions? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reusing formula | Excel Discussion (Misc queries) | |||
Dynamic Range with unused formula messing up x axis on dynamic graph | Charts and Charting in Excel | |||
Match then lookup | Excel Worksheet Functions | |||
Formula Problem - interrupted by #VALUE! in other cells!? | Excel Worksheet Functions | |||
Formula checking multiple worksheets | Excel Worksheet Functions |