MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Barrie, still have problems that I am not able to resolve, would appreciate your help.

Posted by Ed Cupstid on January 30, 2002 6:03 AM


The new code resolved the header problem and the duplication of the one record across sheets and names the sheet using the mm-dd-yyyy format (I had already figured out how to format the date), and it resolved the formatting problem. However, the data in the last two columns (in all sheets) is not correct, and there is a "Header" column being created with a cell value in each of 1 for the first sheet, 2 for the second sheet...etc, would like to have this deleted someway before saving the file. Importing the CSV data creates columns A-T, then column U is being added with "Header" in U1. The cell values starting in row 2 for Columns S & T are wrong. The first "data" record in each sheet has a value of 5.00 in D2 and a cell value of 0.00 in all remaining cells in column D, this is correct. It appears that the cell value (5.00) in D2 is getting copied to all the cells in Column T2 down, and a value of 0.00 is over writting the correct value that should be in Column S2 down. I spent several hours last night trying to figure out what is causing this...but have failed. Hope I have explained the problem clearly enough for you. I know you must have better things to do than work on someone else's problem, but I really need and appreciate your help.

Posted by Barrie Davidson on January 30, 2002 6:17 AM

Ed, I see what I forgot to do in the code. Insert this line:


between the line that reads:


and the one that reads:


You'll find these lines right near the end of the loop. This will get rid of the additional column of data (column U).
Not sure about the other problem you have. Is it possible for you to send me a copy of your CSV file so I can test it?

Barrie Davidson

Posted by Ed Cupstid on January 30, 2002 7:23 AM

Barrie, you have solved all my problems...I deeply appreciate your knowledge and your willingness to help.


This fixed all problems....I inserted the last code you sent me, rebuilt the CSV file ran the macro and now all the data is showing up in the right order and is correct. It leads me to think that my previous CSV file was corrupt. I deeply appreciate your kindness, time and willingness to help me with this. Thanks again.

Best Regards,
Ed Cupstid