ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Lookup (https://www.excelbanter.com/excel-discussion-misc-queries/2201-lookup.html)

Tray

Lookup
 
I have 2 spreadsheets. One is a database of all our dealer codes and the
state they are located in. The other is a list of all dealer codes that took
part in a promotion. I would like to add a column to the 2nd spreadsheet and
have excel look up each dealer code and insert which state they are in.

tjtjjtjt

Use VLOOKUP.
=VLOOKUP(CodeToLookup,sheet1!YourDatabase,2,0)
Copy down as necessary.

Example
The database here is A1:B10 on Sheet1. The answers to be returned in Column
B on Sheet2, based on the Codes kept in Sheet2 Column A.
On Sheet2 in cell B1:

=VLOOKUP(A1,Sheet1!$A$1:$B$10,2,0)
Copy down as necessary.

tj

"Tray" wrote:

I have 2 spreadsheets. One is a database of all our dealer codes and the
state they are located in. The other is a list of all dealer codes that took
part in a promotion. I would like to add a column to the 2nd spreadsheet and
have excel look up each dealer code and insert which state they are in.



All times are GMT +1. The time now is 09:27 PM.

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