Using Wildcards in Substitute function

KenCriss

Active Member
Joined
Jun 6, 2005
Messages
326
I have tried to use the Substitute function to replace part of a file. I need to do this in VBA with a UDF or something.

I want to search for this string (the characters between < employeeid >< /employeeid > could vary - that is the wildcard part)
< employeeid >A7554A01-411E-196E-E040-A8C0C2DC5F7D< /employeeid >

and replace with
< employeeid >< /employeeid >


Any thoughts on this?
 
Last edited by a moderator:

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
You can do it from the UI (or VBA if you prefer):

Find < EmployeeID >*< /EmployeeID > (sans spaces) and replace with < EmployeeID >< /EmployeeID > (sans spaces)
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,217
Members
452,619
Latest member
Shiv1198

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