Using If and Vlookup together.

H

Honey

Hello

Here is the problem - If cell A1 has 0 then I want B1 to be
0...however if A1= 1 I want B1 to display the result from a look up
table.

I just keep getting error messages and I am ready to chuck the
Computer out of the window.....I am using Office Excel on Mac but that
does not normally make a difference to formulas.

Thank you!!

Lyndsey
 
M

Mike

Lyndsey,

Try this in B1

=IF(A1=0,A1,IF(A1=1,VLOOKUP(A2,H1:I10,2,FALSE),"Unspecified"))

Note that the value to look up if A1 is 1 is in A2 and the lookup array is
H1 to I10 all of which can be changed as required. You didn't say what you
wanted for other values in A1o the formula will return "Unspevcified"

Mike
 
R

Ron Coderre

If you post the formula that isn't working, you'll likely get a custom,
working formula back....
otherwise, you'll receive a generic formula that may or may not solve your
problem.


***********
Regards,
Ron

XL2002, WinXP
 
B

Bob Phillips

see other thread

--
---
HTH

Bob

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