Greetings all.
I am a VBA newbie, currently studying and working on a personal project importing multiple .csv documents into my current workbook with their own different sheet, but I'm stuck at a stage where after csv files been imported to my current workbook, some dates are converted to mm/dd/yyyy, while their original formates are dd/mm/yyyy in csv. Also, some of the dates changed to 'general' type. As I am using dd/mm/yyyy format and aim to run date range filter, it always gave me incorrect outcome. I have now located the issue and have no idea how to fix them.
After I run the followling macro, it imports my selected csv files and merge them with my current workbook, and the flexibility is my greatly prefered. It just the date format that confusing me. I have attached file1.csv which is one of my original file.
Currnet VBA I am using as follows.
After I run the macro, the dates becomes totally different as what shown on csv file. see attachment 'Screen Capture' (list on the left side are incorrect data, left aligned are general type and right aligned are mm/dd/yyyy, and list on the right side are original data, which are what I wantted).![]()
Please Login or Register to view this content.
Hope I have explained my confusion.
Please kindly advise how can I fix the problem. Any help would be greatly appreciated. Thank you
Bookmarks