Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How to replace cell value based on other cell's value using macro
Dear all,
I have 2 excel files. The first file is the main file that have transactions. The other file contain static data which is a list of full code, description & short code. How do i create a macro to replace the full code(ColumnC) in main file with description(ColumnB) found in the static data file? But change the full code(ColumnC) in the main file only if the value in ColumnB is SOLID and the first 2 character in full code(ColumnC) is equal to short code(ColumnC) in the static data file.The following is the scenario for better understanding. Thanks in advance for any help given. Main file: ColumnA ColumnB ColumnC XY12083 SOLID HHIY LK02491 TEMP HYTO BGY1232 SOLID BSVV UYTB981 SAMPEL JIEI Static data file: ColumnA ColumnB ColumnC HHIY Household HH HHXS Household HH BSVV Bookstore BS BSKY Bookstore BS SPTB Sports SP SPMI Sport SP Expected output in the main file: ColumnA ColumnB ColumnC XY12083 SOLID Household LK02491 TEMP HYTO BGY1232 SOLID Bookstore UYTB981 SAMPEL JIEI |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and replace a character in a cell with another cell's content | Excel Programming | |||
increment cell value based on another cell's value | Excel Programming | |||
Select a cell based on an other cell's value | Excel Worksheet Functions | |||
insert rows based on a cell's value (macro) | Excel Programming | |||
Varying a macro based on a cell's value | Excel Programming |