Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that Deletes All rows except first row
Greetings everyone! How can I delete all rows in an excel sheet except the first row? I have an excel sheet where the first row has header information and the subsequent rows contains data. I would like to run a vba macro that clears/delete all the data , starting from row 2, in the excel sheet but retains the header information in row 1. Curtney Jacobs -- curtney ------------------------------------------------------------------------ curtney's Profile: http://www.excelforum.com/member.php...o&userid=36469 View this thread: http://www.excelforum.com/showthread...hreadid=562327 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that Deletes All rows except first row
Rows(1).Offset(1, 0).Resize(Rows.Count - 1).ClearContent -- Kaa ----------------------------------------------------------------------- Kaak's Profile: http://www.excelforum.com/member.php...nfo&userid=751 View this thread: http://www.excelforum.com/showthread.php?threadid=56232 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro that Deletes All rows except first row
Thanks, that did the trick! All the rows get deleted from row 2 onwards! Is there a way to reset the active cell back to the second row after deletion? Meaning the active row/cell should be the second row again. Thanks, Curtney -- curtney ------------------------------------------------------------------------ curtney's Profile: http://www.excelforum.com/member.php...o&userid=36469 View this thread: http://www.excelforum.com/showthread...hreadid=562327 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro that deletes rows from cell containing End to end of data. | Excel Discussion (Misc queries) | |||
Macro that deletes certain rows only | Excel Programming | |||
Why xl deletes 250+ rows using worksheet_change | Excel Programming | |||
Help With a Loop That Deletes Rows | Excel Programming | |||
Macro that deletes certain rows and not others | Excel Programming |