Date formatting

Solved/Closed
Jay - Mar 11, 2010 at 09:22 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Mar 12, 2010 at 04:29 PM
Hello,

I am currently downloading a report from an external source (csv file format) into excel and one of the fields (column P) should be represented with a date however I simply get ###### hence i have to copy the data of that column into a seperate worksheet and insert a fromula =dategregtojul(cell) to covert that number into date format.

Was wondering if there is a quicker way around this??/

Thanks guys, Jay
Related:

4 responses

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 11, 2010 at 01:53 PM
not knowing how you initially open it, But once the data is in excel you can use text to column

1. Select Column A (presuming this is the offending column)
2. Click on "Data" and choose "Text to Column"
3. Choose "fixed Width"
4. make sure that the line that shows up on next screen completely covers the date (most probably position 10)
5. Select "Column Data Format" to be 'Date' with appropriate date format (it seems your is YMD)
6. Click Finish
1
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 11, 2010 at 09:41 AM
What is the text in that column. If you could mention what the initial value is in that column, one may be able to suggest some thing
0
Hey,

the when i open the csv file the format is as such; 20080820
0
Hi,

Thanks that works also in addition to the dategreg formula.

But i was wondering if there is some for of maybe VBA i could insert so that column get auto formatted when i paste the data into my excel sheet?? maybe a bit of a long shot??

cheers mate
0
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 12, 2010 at 04:29 PM
Well you can have all this done in the macro too. Record you action once, and then next time when you paste data, just run the macro again. It can be done automatic too, but there are just too many if and buts. So I would say, record the macro. And then just re-run it every time you need it
0