View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
[email protected] westie144@gmail.com is offline
external usenet poster
 
Posts: 3
Default Desperately need a command or something!

On Feb 2, 11:08 am, mitch phelps <mitch
wrote:
I need to delete muliple rows in the excel file and would like to repeat the
pattern throughout the file as I'm looking for specific rows to keep and I
have tons of rows. I'm looking for a shortcut instead of spending hours
deleting rows.

For example: I need to be able to delete 22 rows then skip one row, delete
22 rows then skip one row, and so on.

I am really needing help!


Hi Mitch,
I think you would need some macro code for this as Excel doesn't have
a shortcut of this type. You probably need something like this:
This example deletes rows in the current region on worksheet one where
the value of cell one in the row is the same as the value in cell one
in the previous row.

For Each rw In Worksheets(1).Cells(1, 1).CurrentRegion.Rows
this = rw.Cells(1, 1).Value
If this = last Then rw.Delete
last = this
Next

Visit http://www.tayop.com.au/Courses/Exce...1/Default.aspx
if you wish to learn VBA macros for Excel

Cheers
Mark