View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default If - Then Code Help needed

=IF(HOUR(G2)<4,formula1,formula2)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Scott" wrote in message
...
I am creating a new column for an Excel program but this column needs to
use
two different formulas based on a Start time in column G. If the Start
time
is before midnight then I use one fomula and if the start time is after
midnight but before 4 a.m. then I use a different formula. The formulas
work
perfect but I can't seem to write the initial condition correctly so that
it
knows which formula to use.

Essentially, how could I write an If Then statement that says if the scan
time in cell ( #, G ) is 24:00 and < 04:00 then

Calculation # 1

Else

Calculation # 2