I am using a macro to generate a file with 3 columns ( A,B,C) and save it to a csv. I have everything working fine except when I save it. The file saves correct but it saves all Lines in columns after the data with a " " " in the rows of each line. I need to clean this up. The ending line will different everyday, and I need to delete from the first open line to end of workbook.
I tried this:
Selection.End(xlDown).Select
Range("A100:C100").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.Delete Shift:=xlUp
But the cell reference will change everyday, so I tried:
Selection.End(xlDown).Select
Range("A:C").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Selection.Delete Shift:=xlUp
and now it deletes all data. Any help will be great Below is a example of my data and how it looks. I need to get rid of all the " " " and these only show up when I view it in notepad, but the program I use looks at the " " " as data
6/27/2012 0:00,aaaa,-0.011111
6/27/2012 0:00,bbbb,-0.22222
6/27/2012 0:00,cccc,-0.03333
6/27/2012 0:00,ddddd,-0.0044
6/27/2012 0:00,xxxxxx,-0.0555
' '
' '
' '
' '
' '
The ending line will different everyday, and I need to delete from the first open line to end of workbook.Why do you need to delete blank (open) rows, or is there data underneath a blank row that you want to eliminate? Also, can you be clearer on thisThe file saves correct but it saves all Lines in columns after the data with a " " " in the rows of each line.?