Need VBA to change date format in text of entire column

skyport

Active Member
Joined
Aug 3, 2014
Messages
374
I have text in column A spread out over as much as a few hundred cells. The data contains normal sentences and paragraphs along with occasional dates which will show up in any one of four different formats in general being: M/D/YY, MM/DD/YY, M/D/YYYY and MM,DD,YYYY. What I need to be able to do is be able to run a code from a module that will allow me to choose which date format I want to use that particular day and change all dates that show up in column A to that one selected date format. I am not able to do this by simply formatting the cells because the source data comes from a word document with its own formatting that seems to prevent any Excel date formatting under the normal process I believe. Can anyone suggest a code that would do this?
 
You are absolutely right. I made the goof in post 1 with the commas. made your recommended adjustments and it works perfectly!! Thanks as always for the marvelous solution. :)
You are welcome.
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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