Formatting issue.

Craig1

Active Member
Joined
Jun 11, 2009
Messages
322
Hi Guys,
When I tranfer data into my workbook it always comes in formatted like 20110424. I know I can manually format the column to 24/04/2011 but is there a way of making excel automatically keep the 24/04/2011 format instead of excel changing it to the imported format of 20110424.

Craig.

Just thought I would ask this quick question before I go see the Easter Bunny.
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Assuming your date was in column "B"
then
You could also change this to an Auto_Open macro so that was done everytime you opened the workbook.
Code:
SubFormatdate()
    Columns("B:B").NumberFormat = "d/m/yyyy;@"
End Sub
 
Upvote 0
If you knew which column you wanted t4o format ahead-of-time, it might be simlper just to format that column in advance, to save yourself the hassle.

Alternatively, a worksheet change event might be the ticket? I don't know whether Excel will convert the date to a serial number before triggering the event or afterward. If it's the former then you might be out of luck.

Excel doesn't have any feature I'm aware of to turn off automatic date recognition, and Google appears to agree.
 
Upvote 0

Forum statistics

Threads
1,224,558
Messages
6,179,512
Members
452,921
Latest member
BBQKING

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