Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Wonder if someone can help please. I am currently using a macro that takes many hundred .csv files that are email attachments and copies them into one master spreadsheet. Within this spreadsheet that are text, numeric and date fields. When I copy the information into the master spreadsheet the date fields change from dd/mm/yyyy hh:mm to mm/dd/yyyy hh:mm. Has anyone an idea how I can stop this happening please? I've tried allsorts. I know I can change the format for the fields within the excel, but I'm wanting if possible to put this in the coding because there is an awful lot of data to sort through. Thanks and regards Chris |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Chris,
Try adding this to your code - amend column as needed: Range("A:A").NumberFormat = "dd/mm/yyyy hh:mm" HTH "ir26121973" wrote: Hi, Wonder if someone can help please. I am currently using a macro that takes many hundred .csv files that are email attachments and copies them into one master spreadsheet. Within this spreadsheet that are text, numeric and date fields. When I copy the information into the master spreadsheet the date fields change from dd/mm/yyyy hh:mm to mm/dd/yyyy hh:mm. Has anyone an idea how I can stop this happening please? I've tried allsorts. I know I can change the format for the fields within the excel, but I'm wanting if possible to put this in the coding because there is an awful lot of data to sort through. Thanks and regards Chris |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Thanks for getting back to me. I'll give it a try. Regards Chris "Toppers" wrote: Chris, Try adding this to your code - amend column as needed: Range("A:A").NumberFormat = "dd/mm/yyyy hh:mm" HTH "ir26121973" wrote: Hi, Wonder if someone can help please. I am currently using a macro that takes many hundred .csv files that are email attachments and copies them into one master spreadsheet. Within this spreadsheet that are text, numeric and date fields. When I copy the information into the master spreadsheet the date fields change from dd/mm/yyyy hh:mm to mm/dd/yyyy hh:mm. Has anyone an idea how I can stop this happening please? I've tried allsorts. I know I can change the format for the fields within the excel, but I'm wanting if possible to put this in the coding because there is an awful lot of data to sort through. Thanks and regards Chris |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculated Field in Pivot Table Based on Two Counted Fields | Excel Discussion (Misc queries) | |||
NETWORKDAYS - Multiple Date Selection | Excel Discussion (Misc queries) | |||
How do I calculate if a date is in a certain time frame? | Excel Worksheet Functions | |||
Count the occurances of a month in a range of date fields | Excel Worksheet Functions | |||
Sum function on multiple date fields | Excel Worksheet Functions |