# Nesting VLOOKUP in an IF statement.

1. ## Nesting VLOOKUP in an IF statement.

I am trying to write a formula that uses both an if statement and a vlookup statement.

It's for a house cleaning price list, with two sets of prices. I want the formula to say if the value in E7 is R, i want to lookup the value for the house in the second column. If the value in the cell is anything else, i want to lookup the value for the house in the third column.

So in sense, my formula should look like =IF (E7=1,"=VLOOKUP(A10,'Clean Prices'!\$A\$2:\$C\$58,2,FALSE)","=VLOOKUP(A10,'Clean Prices'!\$A\$2:\$C\$58,3,FALSE)")

But it doesn't work. Is it possible to nest a vlookup in an if statement?  Register To Reply

2. ## Re: Nesting VLOOKUP in an IF statement.

Should be:

=IF (E7=1,VLOOKUP(A10,'Clean Prices'!\$A\$2:\$C\$58,2,FALSE),VLOOKUP(A10,'Clean Prices'!\$A\$2:\$C\$58,3,FALSE))  Register To Reply

3. ## Re: Nesting VLOOKUP in an IF statement.

You don't need the quotes or the equal signs for your VLOOKUPS. ``Please Login or Register  to view this content.``
Does that work for you?  Register To Reply

4. ## Re: Nesting VLOOKUP in an IF statement.

Or =VLOOKUP(A10,'Clean Prices'!\$A\$2:\$C\$58,IF(E7="R",2,3),FALSE)  Register To Reply