View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
geebee2k geebee2k is offline
external usenet poster
 
Posts: 1
Default Logical value in time formula?

This is a simple question compared to some others here! :-)

I have come across a spreadsheet which does various calculations on time
values. The formula in question is:
=C10+(C10<C5)-C5

....where C5 and C10 are both time values (e.g. 9:30 PM). The formula seeks
to determine the elapsed time between C5 and C10. Obviously, the expression
(C10<C5) is a logical expression, and evaluates to such if it is entered into
a test cell (it evaluates to "TRUE" in every case I tested.) The formula
calculates properly if this term is included, and does NOT calculate properly
if it is NOT included.

I've never used logical expressions in an arithmetic formula. Can anyone
explain why the logical term is necessary, and how it works? I'm just not
comfortable passing the spreadsheet along without understanding how
everything works!

Thanks,
Geebee