Excel not recognizing date in date format

outlawspeeder

Board Regular
Joined
Jan 17, 2009
Messages
225
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
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
maybe try Data - Text to Columns, choose proper Date format in 3rd step
 
Upvote 0
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.
 
Upvote 0
Presuming your date is in column A, try;

Code:
Sub Macro()

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

End Sub
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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