Delete all Rows Macro

W

Wanna Learn

Me again ... What I need is a macro to delete all rows except row 1 and also
delete all formating e.g. borders, patterns thanks again
 
D

Don Guillett

good up until xl2007. SAVE workbook.

Sub deleteallrowsbut1()
Rows("2:65536").Delete
End Sub
 
S

Sandy Mann

Don,

Out of interest, (assuming you have XL2007), would:

Sub AllButOne()
Rows("2:" & Rows.Count).Delete
End Sub

work in all versions?

--

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

[email protected]
[email protected] with @tiscali.co.uk
 
D

Don Guillett

I do have xl2007 courtesy of special MicroSoft introduction but still in the
box until I get a new computer.
I assume that would work but there sure are a lot of rows....
 
Top