View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Workbook Workbook is offline
external usenet poster
 
Posts: 121
Default Subtracting Dates to Find the Difference in Hours

I am trying to create a formula that will find the difference in hours
between 1/9/2009 (I2) and 1/12/2009 (J2) in hours without including weekends.
Bob Phillips recommended this formula.

=NETWORKDAYS(I2,J2)-(WEEKDAY(I2,2)<6)
+(1-MOD(I2,1))*(WEEKDAY(I2,2)<6)
+(MOD(J2,1)-1)*(WEEKDAY(J2,2)<6)

However when I try to use it I get this message #NAME? Any advice?