View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default Totaling some hours but not others HELP!


Assuming B28 and D28 contain both time and date and also assuming that
these might be on Sundays this formula will give total hours excluding
any time on a Sunday

=INT(D28)-INT(B28)-INT((WEEKDAY(B28-1)+INT(D28)-INT(B28))/7)+IF(WEEKDAY(D28)=1,1,MOD(D28,1))-(WEEKDAY(B28)<1)*MOD(B28,1)

format as [h]:mm


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=507186