Removing a // double slash in a date

ou812

New Member
Joined
Aug 24, 2018
Messages
19
Hi,

Back before my time, a program that was written that we no longer have access to the source code wrote dates for some cells with a double slash such as 12//01/2018. I have to go through multiple worksheets in the workbook and manually replace these after the application completes its run. There are a total of 7 tabs and the date appears in different columns on different tabs. For example, on tab "Tampa", the date column is D while on tab "Miami" the date column is F. Is there a way in VBA to seek out the column (or date type cell) and if the // exists, to remove the one slash creating an actual date?
 
There are some cells that contain hyperlinks that also contain "//" So I needed a solution that targets ranges of sells. I have to run this section procedurally on each sheet for this reason.

As for the second problem, the particular column that this error occurs in will always be the 1st day of the month in the format of mm/d/yyyy.
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
As for the second problem, the particular column that this error occurs in will always be the 1st day of the month in the format of mm/d/yyyy.
In that case, given 121/2018 is supposed to be 12/1/2018, how do you know 11/2018 is supposed to be 11/1/2018 and not 1/1/2018?
 
Upvote 0
Nov 1 would be 111/2018. Jan 1 appears as 11/2018. The application does not drop numbers. The application only drops the "/" and has been doing so for well over 10 years. It has been audited many times and the only errors are the slashes.
 
Upvote 0
I did not mispeak. In the example 11/12018, the slash between day and year is missing.

So, to clarify, sometimes the application does a double slash, sometimes the application drops the slash between month and day, sometimes the application drops the slash between day and year, and sometimes, the application does it's job correctly.
 
Upvote 0

Forum statistics

Threads
1,223,630
Messages
6,173,454
Members
452,514
Latest member
cjkelly15

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