ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Formula to look up from another tab (https://www.excelbanter.com/excel-worksheet-functions/215825-formula-look-up-another-tab.html)

Voodoo

Formula to look up from another tab
 
Sheets 1 and 2 both have columns that have unique customer I.D.#s.

Sheet 2 does not have ALL unique customer I.D. #s but Sheet 1 does.

Sheet 2 has another column with a numeric value that I want to pull to sheet
one for each unique customer I.D.

So....I need something to say if this ID# is found in this range of ID#s in
sheet two then put the value of in the cell next to the ID# in sheet 2 into
this cell in sheet 1.

T. Valko

Formula to look up from another tab
 
One way:

=IF(ISNA(VLOOKUP(A1,Sheet2!A:B,2,0)),"",VLOOKUP(A1 ,Sheet2!A:B,2,0))

Copy down as needed.

--
Biff
Microsoft Excel MVP


"Voodoo" wrote in message
...
Sheets 1 and 2 both have columns that have unique customer I.D.#s.

Sheet 2 does not have ALL unique customer I.D. #s but Sheet 1 does.

Sheet 2 has another column with a numeric value that I want to pull to
sheet
one for each unique customer I.D.

So....I need something to say if this ID# is found in this range of ID#s
in
sheet two then put the value of in the cell next to the ID# in sheet 2
into
this cell in sheet 1.




Shane Devenshire[_2_]

Formula to look up from another tab
 
Hi,

=VLOOKUP(A1,Sheet2!A1:D100,2,False)

where A1 is the number you want to lookup in the first column of the range
on sheet2. The 2 indicates the column of the range A1:D100 that you want to
return the info from. And False says you are doing an exact match.

However, there is a problem with the fact that you may have more than one
match on the second sheet. This formula only finds one of those. You didn't
specify what you would do it there are two matches.
--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Voodoo" wrote:

Sheets 1 and 2 both have columns that have unique customer I.D.#s.

Sheet 2 does not have ALL unique customer I.D. #s but Sheet 1 does.

Sheet 2 has another column with a numeric value that I want to pull to sheet
one for each unique customer I.D.

So....I need something to say if this ID# is found in this range of ID#s in
sheet two then put the value of in the cell next to the ID# in sheet 2 into
this cell in sheet 1.


Shane Devenshire[_2_]

Formula to look up from another tab
 
Hi,

=VLOOKUP(A1,Sheet2!A1:D100,2,false)

this will pull the value from column 2 of the range A1:D100 if A1 on sheet1
is found in column A of sheet2. Otherwise it will return NA, so show a blank
instead:

=IF(ISNA(VLOOKUP(A1,Sheet2!A1:D100,2,false)),"",LO OKUP(A1,Sheet2!A1:D100,2,false))


--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Voodoo" wrote:

Sheets 1 and 2 both have columns that have unique customer I.D.#s.

Sheet 2 does not have ALL unique customer I.D. #s but Sheet 1 does.

Sheet 2 has another column with a numeric value that I want to pull to sheet
one for each unique customer I.D.

So....I need something to say if this ID# is found in this range of ID#s in
sheet two then put the value of in the cell next to the ID# in sheet 2 into
this cell in sheet 1.



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

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