Converting dates in the appropriate format

Nelson78

Well-known Member
Joined
Sep 11, 2017
Messages
526
Office Version
  1. 2007
Hello everybody.

In importing data from an external agent, I have to deal with the following situation:

https://imgur.com/a/oU9GE8j

I have to use, preferably, the format dd/mm/yyyy.

But the dates in the yellow cells are not correct, and they are not handleable in a usual way.
I mean: they are respectively 3rd October 2017, 6th Novembre 2015 and 1st July 2015, but Excel "reads" 10th March 2017, 11th June 2015 and 7th January 2015. I realize this in performing differences beetween dates (for instance today - date).

I need a vba solution to adjust all the values.

Thank you in advance.
 
Last edited:

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
You could loop through the cell group and run something like:

Code:
Range("a1").Value = VBA.Format(Range("a1").Value, "dd/mm/yyyy")
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,320
Members
452,635
Latest member
laura12345

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