IF and HLOOKUPFormula

R

Ronbo

I am trying to create a formula that combines If with
Lookup. Example.
Cell a1=1, a2=10, a3=20. The formula that I have in d1
is, =IF(HLOOKUP(A1,A1:A3,3)>=0,(HLOOKUP(A1,A1:A3,3,
(HLOOKUP(A1,A1:A3,2))))). What I want the formula to do
is a LOOKUP and then return the value in a3 if it is
larger than 0 otherwise return the value in a2.

Help is always appreciated.
 
T

Tom Ogilvy

First, HLookup is for horizontal lookup and you data is vertical

Second, you don't need to look up anything

=if(A3>0,A3,A2)

Should do what you describe.
 
R

Ronbo

-----Original Message-----
I am trying to create a formula that combines If with
Lookup. Example.
Cell a1=1, a2=10, a3=20. The formula that I have in d1
is, =IF(HLOOKUP(A1,A1:A3,3)>=0,(HLOOKUP(A1,A1:A3,3,
(HLOOKUP(A1,A1:A3,2))))). What I want the formula to do
is a LOOKUP and then return the value in a3 if it is
larger than 0 otherwise return the value in a2.

Help is always appreciated.

.
I have to use HLOOKUP. The example in A1 is just one
cell.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top