Macro To Mask Data In A Sheet

skf786

Board Regular
Joined
Sep 26, 2010
Messages
156
Hi,

i have some customer data in a sheet named 'Data'. I am looking for a macro that will do the following:

1. Replace dates (wherever they are in the sheet) to 1/1/XXXX where the day and months are replaced with 1s while the year remains the same as given in each cell.
2. Social Security Numbers are replaced with 111-11-XXXX where the last 4 digits are random numbers where the rest are placed with 1s.
3. Replace street address with 111 Main while rest of the address remains the same.

Many thanks.

KF
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Do you have these 3 items in special columns or are they scattered throughout?

Dates seem pretty easy. SS# might be easy if they are all the same format, ie. with dashes. Addresses on the other hand are hard. Do you have your street address in a separate cell from the city, state, and zip?
 
Upvote 0
Do you have these 3 items in special columns or are they scattered throughout?

Dates seem pretty easy. SS# might be easy if they are all the same format, ie. with dashes. Addresses on the other hand are hard. Do you have your street address in a separate cell from the city, state, and zip?
Yes, dates are with dashes, SS number is in standard format with dashes and street addresses are in separate column.
 
Upvote 0

Forum statistics

Threads
1,215,759
Messages
6,126,720
Members
449,332
Latest member
nokoloina

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