Sorry, File extension format not allowing to attach the files.
Hi Dangelor
Thank you very much for your code and for your time spent on this. When I paste the code in VBA I'm getting error code 1004. I'm not figure out what's the wrong on my side. I'm attaching source files and explaining what I need from those files. Please do the needful, it will be a very helpful to complete the process.
I have *.csv and *.DAT files in c:\1 directory. What I need is I have to open date-wise *.CSV file then again I have to open same date file of *.DAT extension file. In that *.DAT file I have Unit,1,2,3 columns. In the 3rd column numeric data should bring to *.CSV file 'B" column. For this I'm using manual operation using "vlookup". But that is time taking process to do the 100s of files. (For this I'm importing *.DAT file to excel using DATA > from text > comma delimiter > process.)
When I'm trying to attach the file it's not allowing to do. I'm pasting the data for your quick reference. In the *.CSV file data format is like this.
Column A | Column B |
Unit | |
SRIKAKULAM | |
VISAKHAPATNM | |
RAJAHMUNDRY | |
TPGUDEM | |
VIJAYAWADA | |
MANGALAGIRI | |
KAKINADA | |
GUNTUR | |
ONGOLE | |
TIRUPATI | |
NELLORE | |
BANGALORE | |
CUDDAPAH | |
ANANTHAPUR | |
BANGALORE | |
CHENNAI | |
MUMBAI | |
DELHI | |
HYDERABAD | |
BENGAL |
In *.DAT file data format is like this :
Unit,1,2,3
SRIKAKULAM,10500,2250,1050
VISAKHAPATNM,22500,1050,900
RAJAHMUNDRY,10500,2250,1050
TPGUDEM,10500,2250,1050
VIJAYAWADA,10500,2250,1050
MANGALAGIRI,10500,2250,1050
KAKINADA,10500,2250,1050
GUNTUR,10500,2250,1050
ONGOLE,10500,2250,1050
TIRUPATI,10500,2250,1050
NELLORE,10500,2250,1050
BANGALORE,10500,2250,1050
CUDDAPAH,10500,2250,1050
ANANTHAPUR,10500,2250,1050
BANGALORE,10500,2250,1050
CHENNAI,10500,2250,1050
MUMBAI,10500,2250,1050
DELHI,10500,2,1050
HYDERABAD,10500,0,1050
BENGAL,10500,2250,1050
I request you to please help me to do the above using Excel VBA.
Thanks with regards,
ABabu