Solved

deleted non blank rows

Posted on 2011-09-06
4
178 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 500 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

733 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