Delete rows but keep formatting to 1000

J

Jock

A worksheet has 1000 formatted rows some of which contain formulae.
A macro will remove entire rows when certain criteria is met and paste to a
different sheet.
When this happens, the number of formatted rows decreases in number by the
same amount that have been moved.
How can I ensure that I always have 1000 rows regardless of how many rows
are removed?
 
J

Jacob Skaria

--One way is to clearcontents rather than deleting the row. But you will have
to clearcontents for the cells without formulas and end of the macro you will
need to sort the range to bring the records together

--Another way is to recreate or copy the formats using pastespecial and fill
formulas into new rows to keep that to 1000.

If this post helps click Yes
 
P

Per Jessen

Hi Jock

How does the macro 'remove' rows?
If you use Cut/Paste, then you can just use Copy/Paste and then use
..ClearContents to clear data afterwards.

Post your macro for further help.

Regards,
Per
 
J

JLGWhiz

Copy and paste wiith subsequent clear contents for souce range will save the
format, but not the formulas. The formulas will have to be re-done if you
want them in their original locations. But you could have a macro that does
that for you.
 
R

Rick Rothstein

It might help if you showed us your code (at minimum, the part that test the
criteria and "removes" the entire row).
 

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

Top