Advanced VBA Macro - Conditional find and replace, multiple sheets, and range

hollytrab

New Member
Joined
Jan 29, 2025
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Please help! I would like to search in column D for either "Retiree - Dental High - Spouse Only" or "Retiree - Dental Low - Spouse Only" in sheet "EE Health Elections", then if either criteria is found, find SSN from Sheet "Spouse Only SSN" column B and replace with SSN from Sheet "Spouse Only SSN" column C. Please let me know if you need more information.
 
You haven't told us how the records on the "EE Health Elections" sheet can be matched with the records on the "Spouse Only SSN" sheet. What data do they have in common, and in which column(s) on each?
 
Upvote 0
Macropod, sorry it's column R in sheet "EE Health Elections". Column R has SSNs that need to match column B in Sheet "Spouse Only SSN" and then be replaced with the corresponding SSN in column C in Sheet "Spouse Only SSN".

kvsrnivasamurthy, I can't provide samples due to sensitive data. SSN = social security numbers.
 
Upvote 0
You haven't told us how the records on the "EE Health Elections" sheet can be matched with the records on the "Spouse Only SSN" sheet. What data do they have in common, and in which column(s) on each?
Macropod, sorry it's column R in sheet "EE Health Elections". Column R has SSNs that need to match column B in Sheet "Spouse Only SSN" and then be replaced with the corresponding SSN in column C in Sheet "Spouse Only SSN".
 
Upvote 0
Re: "I can't provide samples due to sensitive data. SSN = social security numbers."
I don't know if you do or not but if you have a keyboard you can change these to meaningless numbers, and you can also change names for it to be totally incognito.
 
Upvote 0
hollytrab,

Please don't mark a post as the solution if the question does not have a solution.
You should only mark a post as the solution if it contains the solution to the question.

Thanks
 
Upvote 0

Forum statistics

Threads
1,226,771
Messages
6,192,918
Members
453,766
Latest member
Gskier

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