macro help column A to column B based on list

PhoneBoy

New Member
Joined
Oct 2, 2006
Messages
12
I'm sure that the answer is here, but I don't know enough about it to search intelligently.

Problem: I get a huge spreadsheet (10,000 lines or so) each month that I have to divide up and pay people. I have been using a method that I saw in this post

http://www.mrexcel.com/board2/viewtopic.php?t=167633&highlight=macro+replace+text

which Erik Van Geit proposed. I rename my worksheet as data and create a second worksheet called list where I put my replacement text. It works beatifully especially because I have to do this each month and my list changes as we open new stores.

What I am wanting to do is instead of replacing the text, I would like to create a new column with the info. For example, I am currently replacing 8857 with NC. I would like to keep 8857 in column B and add NC in column C. The if/then statements will not work due to the number of replacements that I have (I think).

Any help would be appreciated.

Thanks,
Scott
 
You are my hero. I left the code alone and just added a Blank Column A. One question, when it finished, it gave an error code, but it looks like it was where it didn't find some of my codes such as
8613
9508
etc.

This is also a good thing because it will alert me as to which codes I should have but are missing.

You don't know how much you have simplified what I was doing. I really, really, appreciate it.

Thanks again for all of your help.
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
One question, when it finished, it gave an error code, but it looks like it was where it didn't find some of my codes such as
8613
9508
etc.

The code should tell you when any one of "what" is not on "data" sheet. like

Following data not found

aaa
bbb
ccc

etc
 
Upvote 0
agihcam and jindon - thanks again. I'm marking up these spreadsheets as I type. I have to do 8 of these every month with about 10,000 records (more on some). This is unreal. Thanks again for your help
 
Upvote 0

Forum statistics

Threads
1,215,055
Messages
6,122,902
Members
449,097
Latest member
dbomb1414

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