R
Ronbo
Sorry about the first request, not being complete or
correct. A second try.
I am trying to create a formula that combines IF with
HLOOKUP. Example.
Cell a1 = 1, a2=10, a3=20; b1=2, b2 =12, b3=0 and so on
in row A. In D1 I have 1 in D2 I have the formula =IF
(HLOOKUP(D1,A1:A3,3)>=0,(HLOOKUP(D1,A1:A3,3,(HLOOKUP
(D1,A1:A3,2))))). What I want the formula to do is
return the value in a3 if it is larger than 0 otherwise
return the value in a2. The problem I am having is that
it works fine if cell a3 is >0, but if cell a3 is 0 or
empty it returns 0 rather than 10.
Help is always appreciated.
correct. A second try.
I am trying to create a formula that combines IF with
HLOOKUP. Example.
Cell a1 = 1, a2=10, a3=20; b1=2, b2 =12, b3=0 and so on
in row A. In D1 I have 1 in D2 I have the formula =IF
(HLOOKUP(D1,A1:A3,3)>=0,(HLOOKUP(D1,A1:A3,3,(HLOOKUP
(D1,A1:A3,2))))). What I want the formula to do is
return the value in a3 if it is larger than 0 otherwise
return the value in a2. The problem I am having is that
it works fine if cell a3 is >0, but if cell a3 is 0 or
empty it returns 0 rather than 10.
Help is always appreciated.