Cleanup Credit Card Merchant Names Using VBA

austinb

New Member
Joined
Feb 24, 2021
Messages
19
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
Hello all,

I'm basically looking to create a macro that will search a column of cells for text from a list located on another tab and if found, replaces the text in the original cell with the text from the cell in the other tab.

For example,in Sheet1, B2 = 7-ELEVEN 38587 00073PITTSBURGH PA & B3 = 7-ELEVEN 38671 00073COPPELL TX

I would like the macro to search data found in Sheet2 for "7-ELEVEN" (not case sensitive) and replace both cells B2 & B3 in Sheet1 with just "7-Eleven".

This is somewhat of a continuation of a posted question that hasn't been updated since August of 2019 (Bank Transaction Description/Merchant Cleanup & Auto Categorize (like Mint)).

I am a VBA newbie and any help would be greatly appreciated. Thank you

-Austin
 
Hi Neha,

Thank you for your time however I could not get this to work for me. It doesn't appear to be doing anything when I run it.
You have to change the sheet name according to your workbook, then it will work for you.

The code line - sheets() , here inside parentheses you have to mention your sheet number or name accordingly.
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,224,825
Messages
6,181,190
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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