?
Solved

deleted non blank rows

Posted on 2011-09-06
4
Medium Priority
?
184 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
  • 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 34

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 34

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

840 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