ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   #num fix (https://www.excelbanter.com/excel-discussion-misc-queries/211562-num-fix.html)

Pammy

#num fix
 
I have a formula to calculate longevitity years: In column u some new
service dates are in the year 2009 (school mothers based on hours to get a
service date)
= DATEDIF(U20,$V$3,"Y")
the formula takes the date in u20(new service date) and subtracts from v3
(11/30/2008) and brings the "Y" ( which is total # of years). The ones with
2009 for the year in column u, give me a #num answer. Is there a way to have
the formula fixed so these #num will bring a blank or 0 instead of #num?

Pete_UK

#num fix
 
Try it this way:

=IF(ISERROR(DATEDIF(U20,$V$3,"Y")),0,DATEDIF(U20,$ V$3,"Y"))

you can replace the 0 in the middle with "" if you prefer to see a
blank cell.

Hope this helps.

Pete

On Nov 25, 2:20*pm, Pammy wrote:
I have a formula to calculate longevitity years: *In column u some new
service dates are in the year 2009 (school mothers based on hours to get a
service date)
= DATEDIF(U20,$V$3,"Y") *
the formula takes the date in u20(new service date) and subtracts from v3
(11/30/2008) and brings the "Y" ( which is total # of years). *The ones with *
2009 for the year in column u, give me a #num answer. *Is there a way to have
the formula fixed so these #num will bring a blank or 0 instead of #num?




All times are GMT +1. The time now is 09:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com