Autofill column from data (code) in column next to it

  • Thread starter Thread starter Matt
  • Start date Start date
M

Matt

Hi Excel Masters,

I think there would be a way to this but i wouldn't know where to begin.

I am working in Office 2007 1st off and I have a large customer spread sheet
i'm working with. One of the columns is our customer class which is a 2
character field. That 2 character filed (code) is tied to a description. If i
have 2 columns next to each other can i have 1st column where i wouuld enter
02 for the code it would fil in the cell in the next column wth a description
I set up in a table? i.e

02 Dry Goods Customer (the 'dry goods customer' would auto fill from the
02)

Thanks for any help with this,
matt
 
Yes. Use
=VLOOKUP(A1,Table,2,False) with code no. in A1 and lookup range named as
Table or
=VLOOKUP(A1,sheet2!A:B,2,False) with lookup range in Col A & B on sheet2
 
Thanks for the response.

This is very new territory for me so I'm actually not really sure where to
enter this formula. Do i select the two columns 1st and then type it in the
first cell? Do i need to go to formulas tab and select certain formula? I'm
still unclear as to where I make the table or sheet2 where the codes will
resolve their discription.

sorry... just not that experiences in excel.
Matt
 
In Sheet2 Col A enter all the codes you have... Col B enter the corresponding
description for each code.

Now in A1 of Sheet1 enter any code
in B1 of Sheet1 enter the formula
=VLOOKUP(A1,sheet2!A:B,2,False)

You will get the description for A1 in B1 of Sheet1

You can copy the formula in B1 down the column so that you can enter the
code in A1

When A1 is blank you will get #N/A error. To avoid that use this in B1
instead of the above formula
=IF(ISNA(VLOOKUP(A1,sheet2!A:B,2,False)),"",VLOOKUP(A1,sheet2!A:B,2,False))
 
Back
Top