View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default How to create a macro to delete multiple rows?

You can delete multiple rows with code like

ActiveCell.Resize(100, 1).EntireRow.Delete

This code will delete entire rows starting with the active cell down to row
number ActiveCell.Row + 99.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"gak27" wrote in message
...
Greetings!

This question is for Excel 2007.

I am working with data sets that have many rows of data and I only need a
few of them. What I would like to do is create a macro that will delete
100
rows from my worksheet, starting where I place the cursor. What is the
best
way to do this? Whenever I try to record the macro and use it I always
wind
up having the 100 rows being deleted from the same location, but I need to
move down through the entire spreadsheet.

greg