ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Adding the IF function to a VLOOKUP function. (https://www.excelbanter.com/excel-discussion-misc-queries/245977-adding-if-function-vlookup-function.html)

Kristine

Adding the IF function to a VLOOKUP function.
 
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!!!!
--
Kristine

BSc Chem Eng Rick

Adding the IF function to a VLOOKUP function.
 
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"
<<<<<<<<<<

"Kristine" wrote:

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!!!!
--
Kristine


Gord Dibben

Adding the IF function to a VLOOKUP function.
 
On which sheet and which column is the formula being entered?

Which sheet has the customer names?

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







On Tue, 20 Oct 2009 07:52:01 -0700, Kristine
wrote:

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




All times are GMT +1. The time now is 09:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com