Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Calculating the difference between hours


Thanks for u myrna,

I have used this formula:

=IF(AND(INT(StartDT)=INT(EndDT),NOT(ISNA(MATCH(IN
(StartDT),HolidayList,0))))
,0,ABS(IF(INT(StartDT)=INT(EndDT),ROUND(24*(EndDT-StartDT),2),
(24*(DayEnd-DayStart)*
(MAX(NETWORKDAYS(StartDT+1,EndDT-1,HolidayList),0)+
INT(24*(((EndDT-INT(EndDT))-
(StartDT-INT(StartDT)))+(DayEnd-DayStart))/(24*(DayEnd-DayStart))))+
MOD(ROUND(((24*(EndDT-INT(EndDT)))-24*DayStart)+
(24*DayEnd-(24*(StartDT-INT(StartDT)))),2),
ROUND((24*(DayEnd-DayStart)),2))))))


Pls try & reply
SAM

--
Sambus
-----------------------------------------------------------------------
Sambusa's Profile: http://www.excelforum.com/member.php...fo&userid=1496
View this thread: http://www.excelforum.com/showthread.php?threadid=26588

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Calculating the difference between hours

Do what I told you: you must add 2 to each and every one of your references to
StartDT and EndDt. My newsgroup reader doesn't have search and replace to do
it for you. Excel does.

On Wed, 6 Oct 2004 11:03:56 -0500, Sambusa
wrote:


Thanks for u myrna,

I have used this formula:

=IF(AND(INT(StartDT)=INT(EndDT),NOT(ISNA(MATCH(IN T
(StartDT),HolidayList,0))))
,0,ABS(IF(INT(StartDT)=INT(EndDT),ROUND(24*(End DT-StartDT),2),
(24*(DayEnd-DayStart)*
(MAX(NETWORKDAYS(StartDT+1,EndDT-1,HolidayList),0)+
INT(24*(((EndDT-INT(EndDT))-
(StartDT-INT(StartDT)))+(DayEnd-DayStart))/(24*(DayEnd-DayStart))))+
MOD(ROUND(((24*(EndDT-INT(EndDT)))-24*DayStart)+
(24*DayEnd-(24*(StartDT-INT(StartDT)))),2),
ROUND((24*(DayEnd-DayStart)),2))))))


Pls try & reply
SAMI


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating the difference between hours Oliver Excel Worksheet Functions 1 June 1st 08 07:48 PM
Calculating the difference between hours Sambusa[_8_] Excel Programming 1 October 6th 04 04:42 PM
Calculating the difference between hours Sambusa[_3_] Excel Programming 1 October 4th 04 02:20 PM
Calculating the difference between hours Sambusa[_2_] Excel Programming 0 October 3rd 04 05:28 PM
Calculating the difference between hours Sambusa Excel Programming 1 October 3rd 04 05:05 PM


All times are GMT +1. The time now is 11:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"