inserting data from a list

C

CPiper

I am currently working with a large group of data that I
need to sort out by company name. The data is a large
list of transacation and rather than entering the company
name, the database manager decided to give each office a
4 digit code. Each company has multiple offices to
consider each having a unique identifier. My columns
layout something like this. Sheet2 has the transaction
data and column A is the office code. Sheet1 has the
office list, column A is the four digit code, column B is
the office name, and column C is the city that it is
located in. If I were to create a new column, would
there be any way for excel to compare the office from the
transaction, against the list of 4-digit codes on sheet1
and return the corresponding office name from sheet1
Column B? I would appreciate someone pointing me in the
right direction. Thank You

CPiper
 
K

Katherine Coombs

Hi there,

Absolutely. If you insert a column on Sheet 2, such as Column A is the four
digit code, Column B is the office name and Column C onwards is the
transaction data you would need to plug in the following formula into column
B:

=VLOOKUP(A1,Sheet1!$A$1:$B$2000,2,FALSE)

Please note that I've chosen B2000 arbitrarily, so if you have fewer offices
than that, eg your office data only extends into row 700, you could change
that the formula to:

=VLOOKUP(A1,Sheet1!$A$1:$B$700,2,FALSE)

HTH,
Katherine
 

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