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

On 2 Feb, 00:57, "Don Guillett" wrote:
Easily done with a macro. give an example of your data

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"mitch phelps" <mitch wrote in ...



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!- Hide quoted text -


- Show quoted text -



If the rows you want to save are different each time and there is no
easy way to identify them - you could try the following.

Add a column that numbers all the rows - if you type 1 in the top row
and 2 in the second row you can then drag the values down over the
whole sheet.
Then add another column with this formula copied into each cell:
=IF(A2/3=INT(A2/3),"Save","")
This example would return a value of "Save" into each cell where the
row number is exactly divisible by 3. If you wanted to save every
23rd row you would change both 3's in the example to 23's.
Once you've done this you should have a value of "Save" in your new
column for each record you want to save.
Now copy the entire contents of your new 2 columns and paste them back
as values so the formulas don't break when you sort them.
Sort by the the new 'save' column.
Delete all the rows without the 'save' value.
Now sort again by your new row number column and delete the contents
of this column.

Each time you want to do this you'll need to re-number the rows but
you can leave the 'save' column.

This isn't as efficient as setting up a macro but is very felxible.
If you have any difficulty with it feel free to email me.

http://www.justgiving.com/goodsamaritanit