Adding the IF function to a VLOOKUP function.


K

Kristine

I am trying to enter a VLOOKUP function into a formula. I need to add a IF
function to it. I have chatted with my professor and she sent me these
instructions along with a sample worksheet.
Here is what she said:
You would want to use a VLOOKUP with the array referenced back to the
columns in the sheet with the customer names. I am sending you an example.
The main issue here is that we know the company will continue to add
customers and sales, so we want to set the VLOOKUP array to use the columns
rather than specific cell references. Also, it should be copied throughout
the column in the second sheet. Notice that I have it set up with and IF
function so that it will leave the name blank if there is no input in the
cell for the client number.

And here is the formula she sent:
=IF(A1="","",VLOOKUP(Sheet2!A1,Sheet1!A:B,2))

I just can't seem to figure out how to make it work? HELP PLEASE!!!!
 
Ad

Advertisements

B

BSc Chem Eng Rick

Be very careful with how your data is arranged when you use VLOOKUP. See
Excel help. If my intuition serves me well the quick fix is to do the
following to your VLOOKUP:

VLOOKUP(Sheet2!A1,Sheet1!A:B,2,FALSE)

The FALSE will return exact matches and doesn't care if your data is
ascending or not.

If this helps please click "Yes"
<><><><><><><><><><>
 
Ad

Advertisements

G

Gord Dibben

On which sheet and which column is the formula being entered?

Which sheet has the customer names?

=IF(A1="","" is referring to which sheet?
 

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

Top