Excel not recognizing date in date format

outlawspeeder

Board Regular
Joined
Jan 17, 2009
Messages
205
Office Version
  1. 2019
I am pulling information in from a web site and I have a column with what looks like a date but is not recognized as a date by Excel. I have tried on the Excel copy and paste as …. The dates are left handed justified. If I click into the cell and do a hard return it moves to the right justification and it is now a date.

If I record this as a Macro it shows me entering that date from the cell.


Looking for a VBA solution or guidance

Thanks
 

Some videos you may like

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

sandy666

Banned - Rules violations
Joined
Oct 24, 2015
Messages
7,499
maybe try Data - Text to Columns, choose proper Date format in 3rd step
 

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
36,680
Office Version
  1. 2010
Platform
  1. Windows

ADVERTISEMENT

Are you UK or US based? Or other?
I have found in the past when a date (or number) looks correct but is left justified, simply selecting the column and clicking the Finish button as soon as the Text To Columns dialog box appears is sufficient to "correct" the entries.
 

ChrisFoster

Board Regular
Joined
Jun 21, 2019
Messages
127
Office Version
  1. 365
Platform
  1. Windows
Presuming your date is in column A, try;

Code:
Sub Macro()

Range("A:A").NumberFormat = "mm/dd/yyyy" 

End Sub
 

outlawspeeder

Board Regular
Joined
Jan 17, 2009
Messages
205
Office Version
  1. 2019
Chris and Rick
both work
Data to text I recorded into a Macro for each
and
Number format I did a loop.


Thank you for the help
 

Watch MrExcel Video

Forum statistics

Threads
1,122,521
Messages
5,596,645
Members
414,083
Latest member
Mrsash

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
Top