Martin
asked on
Excel Time Problem
I am using excel to try and calculate drive time between 2 different time zones. So in Cell B26 I have 6:56 which is formatted h:mm. In cell C26 I have "CST", in Cell D26 I have the formula: IF(OR(B26="",B26=F26),"",F 26+(MATCH( UPPER(E26) ,{"EST","C ST","MST", "PST"},0)- 1)/24-B26- (MATCH(UPP ER(C26),{" EST","CST" ,"MST","PS T"},0)-1)/ 24). In Cell E26 I have "EST", and in cell F26 I have 7:09 in the same h:mm format.
Now in cell D26, where I have the long formula above it is formatted to [h]:mm. The problem is with the example listed above, I am getting the "########" error in D26. I believe this is because the 2 times listed are less than an hour. Any assistance would be most helpful.
Work-Hour-Tracker--V2-.xlsx
Now in cell D26, where I have the long formula above it is formatted to [h]:mm. The problem is with the example listed above, I am getting the "########" error in D26. I believe this is because the 2 times listed are less than an hour. Any assistance would be most helpful.
Work-Hour-Tracker--V2-.xlsx
"########" usually means that the column isn't wide enough. Try widening it.
ASKER
Acknowledged, however when I widen the column to over 100 and it is still reading, "#######" all the way across, then this seems to be a problem.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try this in D2
=IF(OR(B2="",B2=F2),"",MOD(F2+(MATCH(UPPER(E2),{"EST","CST","MST","PST"},0)-1)/24-B2-(MATCH(UPPER(C2),{"EST","CST","MST","PST"},0)-1)/24,1))
and then copy down.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
There were two solutions to this issue. First understanding that the negative number is what was causing the issue, and second, how to deal with incorporating negative number solutions into the formula. Thank you all.
You are very welcome.
I am glad the issue was (relatively) easy to resolve.
I am glad the issue was (relatively) easy to resolve.