Thread
:
A challenge, Serious help requested
View Single Post
#
12
Posted to microsoft.public.excel.newusers
Sandy Mann
Posts: n/a
A challenge, Serious help requested
Hi Ron,
True, Sandy....I failed to mention that the formula I posted is an ARRAY
FORMULA*.
Yes your use or ROW() should have alerted me to that fact.
Your previously posted formula always calculates 24 hours when both
cells are blank.
If you mean the first formula I posted then yes that's right. My last
formula however does the same as yours with the exception that it returns ""
when there is no trip taking place.
--
HTH
Sandy
In Perth, the ancient capital of Scotland
with @tiscali.co.uk
"Ron Coderre"
wrote in message
...
True, Sandy....I failed to mention that the formula I posted is an ARRAY
FORMULA*.
Your previously posted formula always calculates 24 hours when both
cells are blank.
I believe this formula satisfies the OP's requirements:
=IF(AND(ISBLANK(C2),MAX((C$2:C20)*ROW(C$2:C2))=M AX((B$2:B20)*ROW(B$2:B2))),0,IF(C2="",24,C2*24)-IF(B2="",0,B2*24))
That array formula only calculates times for the trip duration,
ignoring blank cells where no trip is in progress.
(thanks for spotting the mispost)
Regards,
Ron
*Note: For array formulas, hold down [Ctrl] and [Shift] when you press
[Enter], instead of just pressing [Enter].
--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile:
http://www.excelforum.com/member.php...o&userid=21419
View this thread:
http://www.excelforum.com/showthread...hreadid=548056
Reply With Quote