Delete rows but keep formatting to 1000

  • Thread starter Thread starter Jock
  • Start date Start date
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?
 
--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
 
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
 
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.
 
It might help if you showed us your code (at minimum, the part that test the
criteria and "removes" the entire row).
 
Back
Top