?
Solved

deleted non blank rows

Posted on 2011-09-06
4
Medium Priority
?
180 Views
Last Modified: 2012-05-12
I want to find all the non blank rows on the current sheet starting at row 5 and delete them.

0
Comment
Question by:vmccune
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 28

Expert Comment

by:strickdd
ID: 36490976
Start here: http://excel.tips.net/T002386_Conditionally_Deleting_Rows.html

Simply modify the delete condition.
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 36494200
If you are deleting non-blank rows, why not delete all?

The blank rows that are deleted as well will be replaced with new blank rows.

Thanks
Rob H
0
 

Author Comment

by:vmccune
ID: 36494500
If I delete all, will that also delete a command button on the sheet?  How do I felete all?
0
 
LVL 33

Accepted Solution

by:
Rob Henson earned 2000 total points
ID: 36494669
If the command button is anchored above row 5 then it would stay.

How are you determining your last used row?

Assuming you can pull the row value from this as a variable, lets call it n; you could then just select rows 6 to n and use EntireRows.Delete

Alternatively, create a blank template including buttons that you can copy and paste over the relevant area. Then you could clear the whole sheet.

Thanks
Rob H
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question