function/syntax ignorance

G

grilla79

hi again

this time i am trying to write another complex (to me) expression.

i have three time periods of two hours each, with a predicted win
speed for that time. each period has its own cell for start time an
end time
so for the time period 1400-1600, the wind speed is 14kph, fo
1600-1800 it is 10 kph, and for 1800-2000 it is 12 kph. I have eac
time period and wind speed in its own row - i.e. a1=1400, a2=1600
a3=14, b1 =1600, b2 = 1800, b3=10, c1= 1800, c2 = 2000, c3=12.

i want to enter a time (say 1500) in another cell (say d1) and have
formula that will pick the wind speed for that time period (10) and pu
it in d2. Ultimately i will take that wind speed and do some othe
calculations with it but i can do that once i get the right windspeed.

I tried something like =IF(a2>d1>a1), a3) and that works fine but
can't get the syntax to add that IF(b2>d1>b1), b3 (and not a3) and tha
IF (c2>d1>c1), c3 (and not a3 or b3).

I've tried various combinations of IFs, ANDs, and ORs with lots of (
), {, and} for the last two hours but i'm still unsuccessful.

I think this is my last hurdle for this project and I really appreciat
the tremendous help I've found here already. Nobody in my IT is able t
help and all the self-help books I've seen don't go into this amount o
detail. Thanks again

Do
 
M

Myrna Larson

YOu mean the data for each period is in a column, no? And the time in B1
duplicates that in A2, etc.

in D2,

=HLOOKUP(D1,$A1:$C3,3)
 
Top