# 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?

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))

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?

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

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

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1