blank lines at end

  • Thread starter Thread starter S.E.
  • Start date Start date
S

S.E.

I have a macro that save a particular worksheet as a .csv file. When I open
the resulting file in Notepad, I can see that there are lines of blank
information at the end. That is, there are only commas and nothing else.
This will not work for my purposes. What can I add to my macro to remove
those blank lines at the end of the data? If it is helpful, I can remove all
blank lines, it doesn't have to be only at the end. They can be either
removed on the original worksheet or on the .csv file.

Thanks in advance for your help,
Scott
 
Any chance you have something in those cells--maybe you had formulas that
evaluated to "" and you converted to values?
 
I think I found the problem. Those cells previously had content. In the
macro I have written I told Excel to clear contents of those cells.
Apparently what I need to do is delete the information instead. I'm going to
experiment with writing a macro that does that. Clear changes the value of
the cells to "0", but leaves them on the worksheet. Delete removes the cells
altogether.

Scott
 
Now it works.

Scott

S.E. said:
I think I found the problem. Those cells previously had content. In the
macro I have written I told Excel to clear contents of those cells.
Apparently what I need to do is delete the information instead. I'm going
to experiment with writing a macro that does that. Clear changes the value
of the cells to "0", but leaves them on the worksheet. Delete removes the
cells altogether.

Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top