View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein \(MVP - VB\)[_1084_] Rick Rothstein \(MVP - VB\)[_1084_] is offline
external usenet poster
 
Posts: 1
Default IS A TIME BETWEEN TWO TIMES EG 12:00 & 8:00

While the OP is more than likely going to type the value in (so that the
+0.01 correction would not be necessary for that usage), I am struck by how
prevalent the "rounding issue" is. Try using these A1, A2 series
expansions...

A1: 7:40 --- 7:00 --- 6:00 --- 0:00

A2: 7:50 --- 7:30 --- 7:00 --- 4:00

In each case, the generated value for 8:00 will return "Early" when used in
the formula (without the correction). I almost seems that the only time it
doesn't generate "Early" is when it is typed in, or calculated, directly.

Rick


"T. Valko" wrote in message
...
When you drag down to increment the time you're getting into "rounding
issues".

--
Biff
Microsoft Excel MVP


"Rick Rothstein (MVP - VB)" wrote in
message ...
Interesting... it works for me too **IF** I type the time value 8:00
directly into the cell. HOWEVER, when I tested the formula, I put 7:50 in
A1, 7:51 in A2, selected both and copied them down for a total of 20
rows... when you do it that way, the formula generates "Early" for the
time of 8:00 that was series expanded into A11 (I'm using XL2003 if that
matters). The modification I used corrects that... and works for the
directly entered time value too.

Rick


"T. Valko" wrote in message
...
=LOOKUP(A1*24,{0,8,16},{"Early","Day","Late"})

Works for me.

A1 = 8:00 AM

Formula returns Day.


--
Biff
Microsoft Excel MVP


"Rick Rothstein (MVP - VB)" wrote
in message ...
That will assign 08:00 to Early rather than Late (see my follow up
posting).

That should have said...

"That will assign 08:00 to Early rather than DAY" (emphasis added).

Rick