How to convert date from dot to slash format in Excel?
Excel is a powerful tool for managing and analyzing data, including date formatting. Sometimes, dates in your spreadsheet might be in a dot format (e.g., 12.07.2024) when you need them in a slash format (e.g., 12/07/2024). Converting date formats can streamline your data and make it more consistent. Here’s a step-by-step guide on how to convert dates from dot to slash format in Excel.
Convert date from dot to slash format with formula
Convert multiple date from dot to slash format with Kutools for Excel
Automatically convert date from dot to slash format when you type the date with VBA code
Convert date from dot to slash format with formula
In Excel, the normal date format may not help you to convert the dot date to slash date format, but, you can apply the following simple formula to solve it.
1. Please enter this formula: =SUBSTITUTE(A2,".","/") into a blank cell besides your date, see screenshot:
2. Then drag the fill handle down to the cells that you want to contain this formula, and the dot date has been converted to the slash date format, see screenshot:
Convert multiple date from dot to slash format with Kutools for Excel
Kutools for Excel can quickly convert dates that Excel does not recognize into a standard date format, saving you time and ensuring your data is correctly formatted. Follow these optimized steps to convert dates from dot format (e.g., 12.07.2024) to slash format (e.g., 12/07/2024) using Kutools for Excel.
After installing Kutools for Excel, please do as follows:
1. Select the cells that you want to convert to slash date formatting.
2. Click Kutools > Content > Convert to Date, see screenshot:
3. And the dot date format have been converted to the normal slash date format immediately, see screenshot:
Note: You can highlight all the records in the Convert to Date dialog box, and click Recover to cancel this operation to return to the original dot date format as following screenshot shown:
Automatically convert date from dot to slash format when you type the date with VBA code
If you want to auto convert the date form dot to slash format directly when you type the date, the following VBA code may help you, please do as follows:
1. Activate the worksheet that you want to use.
2. Then right click the active tab name, and choose View Code, see screenshot:
3. In the opened Microsoft Visual Basic for Applications window, please copy and paste the following code into it.
VBA code: Automatically convert date from dot to slash format:
Private Sub Worksheet_Change(ByVal Target As Range)
'updateby Extendoffice
On Error Resume Next
Application.EnableEvents = False
If Not (Intersect(Target, Me.Range("A1:A10")) Is Nothing) Then
Target.Value = Replace(Target.Value, ".", "/")
End If
Application.EnableEvents = True
End Sub
4. Then save this code and close the Microsoft Visual Basic for Applications window, after that, when you enter a date format as 09.23.2015 in the range A1:A10 of current sheet, after pressing the Enter key, the date will be converted as 9/23/2015 at once.
Note: In the above code, A1:A10 is the range of cells which can be take effect by applying this code, you can change the cell reference to your need.
By using these methods, you can efficiently convert dates from dot to slash format in Excel. Whether you prefer using formulas, leveraging the powerful features of Kutools for Excel, or automating the process with VBA, these techniques ensure your dates are accurately formatted and ready for analysis. If you're interested in exploring more Excel tips and tricks, our website offers thousands of tutorials.
Demo: Convert non-standard date to normal date formatting with Kutools for Excel
Related article:
How to convert yyyymmdd to normal date format in Excel?
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!