ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Deleting rows based on values in a a cell in the row (https://www.excelbanter.com/new-users-excel/217769-deleting-rows-based-values-cell-row.html)

Martin

Deleting rows based on values in a a cell in the row
 
I deal with a number of huge spreadsheets and need to remove all rows with
the values 2 through -4 in col AE; first I sort AE in descending order, then
manually find the first occurance of 2 in AE, then manually select rows until
the first value occurance after -4. This may involve 100,000s of rows and is
very time consuming, even using Page Down...

Can anyone suggest a macro to to fully automate this ..

I have tried recording a macro but it does not seem to handle handle the
fact the first occurance of a 2 changes each time the spreadsheet is
generated.

Problems of a novice user, and thanks in advance for your help

OssieMac

Deleting rows based on values in a a cell in the row
 
Hi Martin,

This can be done with a macro but after sorting try selecting the first row
with value 2 (click the row number at left of the screen) and then use the
scroll bar to scroll down until the last row with -4 is visible and then hold
the Shift key down while you click on the row number and it will select all
of the rows from the 2 to -4.

--
Regards,

OssieMac


"Martin" wrote:

I deal with a number of huge spreadsheets and need to remove all rows with
the values 2 through -4 in col AE; first I sort AE in descending order, then
manually find the first occurance of 2 in AE, then manually select rows until
the first value occurance after -4. This may involve 100,000s of rows and is
very time consuming, even using Page Down...

Can anyone suggest a macro to to fully automate this ..

I have tried recording a macro but it does not seem to handle handle the
fact the first occurance of a 2 changes each time the spreadsheet is
generated.

Problems of a novice user, and thanks in advance for your help



All times are GMT +1. The time now is 11:51 PM.

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