View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
marquis de montrose marquis de montrose is offline
external usenet poster
 
Posts: 4
Default dates and times in excel

I will add. I don't think that the names for StartDT and EndDT are the proper
case. I will get back to you.

"Chip Pearson" wrote:

That looks like a formula from my site. Do you have all the
required names defined?


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"marquis de montrose"
wrote in message
...
3/6Hello.

I have a formula that calculates date and time differences. The
formula
works when the same day in inputted in the two fields, but not
with two
different days (returns #NAME? . I am using the following
format to input
information (yyyy/mm/dd hh:mm) with my present formatting is
comes out as
(3/6/06 1:30 PM). the formula I am working with. My DayEnd and
DayStart is
8:00 AM - 8:00 PM.
Any ideas?

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