VBA to find/replace information from one sheet to another

dominikapabis

New Member
Joined
Feb 9, 2016
Messages
4
Hello,

I am looking for help on writing a VBA that will replace information in one sheet using a legend that is in another sheet.

I need two things to happen.
1. replace cells in column C in Sheet1 with data from column C in Sheet2 if column C in Sheet1 = column A in Sheet2.
2. also insert the adjacent cell (Item Number) that corresponds with the new description.

Here is a simple sample of the spreadsheet.

Sheet 1 BEFORE Code:
1
ABC
2EQUIPMENT TYPEITEM NUMBERDESCRIPTION
3Actives NC400
4Full Spectrum EQ- Bank 1T2&4 CS12
5T2&4 CS09
6Full Spectrum EQ - Bank 2T8 CS09
7T8 CS06

<tbody>
</tbody>


Sheet 2 (KEY)
1
ABC
2Original DescriptionItem NumberNew Description
3
NC400​
5543
Full Features 2x2
4
T2&4 CS12​
5568Cable Simulator 12db
5
T2&4 CS09​
9956Cable Simulator 9db
6
T8 CS09​
5547Return Path 9db
7
T8 CS06​
6689Return Path 6db

<tbody>
</tbody>


Sheet 1 AFTER CODE:
1
ABC
2EQUIPMENT TYPEITEM NUMBERDESCRIPTION
3Actives 5543Full Features 2x2
4Full Spectrum EQ- Bank 15568Cable Simulator 12db
59956
Cable Simulator 9db
6Full Spectrum EQ - Bank 25547Return Path 9db
76689Return Path 6db

<tbody>
</tbody>


I know that I will have to use a series of loops, I would appreciate any help.

Thanks!`
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Watch MrExcel Video

Forum statistics

Threads
1,114,663
Messages
5,549,295
Members
410,908
Latest member
Allen P
Top