ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Desperately need a command or something! (https://www.excelbanter.com/excel-discussion-misc-queries/175328-desperately-need-command-something.html)

mitch phelps

Desperately need a command or something!
 
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!

Red

Desperately need a command or something!
 
Mitch,

why dont you go to tools, macro, record marcro and create a shortcut that
deletes 22 rows. In this process it also allows you to create a keyboard
command that will initiate the macro. You'd have to put your cursor on the
correct row, run the command, and then go to the next row. If you have a
large set of data it could still take a little while, but will be simpler
than just hi-lighting the rows and deleting them.

Hope this helps.

Red

"mitch phelps" 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!


[email protected]

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

MartinW

Desperately need a command or something!
 
Hi Mitch,

You can use a helper column like this.
Say your helper is col D.
Put a 1 in D23 (D1 to D22 to be left blank)
Then highlight D1:D23
Grag the fill handle and drag down to the end
of your data, hold down Ctrl before letting go
of the left button. This should leave D with
22 Blanks cells then a 1 followed by another
22 Blanks then a 1 etc. etc. down the page.

Then highlight the top row of your data plus the helper
And go to DataFilterAutofilter
From the D dropdown select Blanks
And delete all the rows that are left
Turn Autofilter off and you should be done.

HTH
Martin



"mitch phelps" <mitch wrote in message
...
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!




Don Guillett

Desperately need a command or something!
 
Easily done with a macro. give an example of your data

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"mitch phelps" <mitch
wrote in message
...
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!



[email protected]

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



All times are GMT +1. The time now is 06:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com