Thread
:
Clear all rows except first two
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett[_2_]
external usenet poster
Posts: 1,522
Clear all rows except first two
sub clearrows()
dim lr as long
lr = Cells.Find("*", Cells(Rows.Count, Columns.Count) _
, , , xlByRows, xlPrevious).Row
rows(3).resize(lr).delete
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Paul Kraemer" wrote in message
...
Hi,
I am using Excel 2007. I want to write a VBA Subroutine to delete/clear
all
data on a particular worksheet except for the first two rows.
This worksheet can have any number of rows filled with data. Can anyone
give me a hint on how I can select and clear all rows containing data
except
for the first two rows?
Thanks in advance,
Paul
--
Paul Kraemer
Reply With Quote
Don Guillett[_2_]
View Public Profile
Find all posts by Don Guillett[_2_]