Replacing data in one column with another

babypink2807

New Member
Joined
Jul 13, 2015
Messages
41
Office Version
  1. 2016
Hi

I have a column which has the following numbers

01
02
04
05

These numbers represent a depot

01 Leeds
02 Manchester
04 Huddersfield
05 Lincoln

I need Excel to look up the 01 and replace it with Leeds

Both sets of data are in a different table the old way has been to do CTR and F which is becoming a pain as we are increasing depots etc. SO would prefer that I can say if its 01 please replace with Leeds

Thank you
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hey there!

VLOOKUP will be the way to go. It would look something like this. H1:I5 is the lookup table. Column A is the column with the numbers you described in your post. Column B is the output from the VLOOKUP function.

Excel 2007 32 bit
ABCDEFGHIJ
102ManchesterLookup:
201Leeds01Leeds
304Huddersfield02Manchester
404Huddersfield04Huddersfield
505Lincoln05Lincoln
601Leeds
705Lincoln
805Lincoln
905Lincoln
1001Leeds
1101Leeds
1205Lincoln
1302Manchester
1404Huddersfield
1502Manchester

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B1=VLOOKUP([COLOR=rgb(255]A1,$H$2:$I$5,2,[/COLOR])
B2=VLOOKUP([COLOR=rgb(255]A2,$H$2:$I$5,2,[/COLOR])
B3=VLOOKUP([COLOR=rgb(255]A3,$H$2:$I$5,2,[/COLOR])
B4=VLOOKUP([COLOR=rgb(255]A4,$H$2:$I$5,2,[/COLOR])
B5=VLOOKUP([COLOR=rgb(255]A5,$H$2:$I$5,2,[/COLOR])
B6=VLOOKUP([COLOR=rgb(255]A6,$H$2:$I$5,2,[/COLOR])
B7=VLOOKUP([COLOR=rgb(255]A7,$H$2:$I$5,2,[/COLOR])
B8=VLOOKUP([COLOR=rgb(255]A8,$H$2:$I$5,2,[/COLOR])
B9=VLOOKUP([COLOR=rgb(255]A9,$H$2:$I$5,2,[/COLOR])
B10=VLOOKUP([COLOR=rgb(255]A10,$H$2:$I$5,2,[/COLOR])
B11=VLOOKUP([COLOR=rgb(255]A11,$H$2:$I$5,2,[/COLOR])
B12=VLOOKUP([COLOR=rgb(255]A12,$H$2:$I$5,2,[/COLOR])
B13=VLOOKUP([COLOR=rgb(255]A13,$H$2:$I$5,2,[/COLOR])
B14=VLOOKUP([COLOR=rgb(255]A14,$H$2:$I$5,2,[/COLOR])
B15=VLOOKUP([COLOR=rgb(255]A15,$H$2:$I$5,2,[/COLOR])

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



Let me know if this isn't quite what you were looking for, and we can explore more options.
 
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,667
Members
449,462
Latest member
Chislobog

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top