number less than 100
I would like the code for a macro that does the following:
I have a spreadsheet with a header row and want to delete any rows that have a number in column 9 that is less than 100 -- Mike B |
number less than 100
|
number less than 100
Sort by column 9 and delete the rows... Why use a macro?
"mike b" wrote: I would like the code for a macro that does the following: I have a spreadsheet with a header row and want to delete any rows that have a number in column 9 that is less than 100 -- Mike B |
number less than 100
Hi Mike,
See if this will work for you. Sub Macro1() Range("I1").Select Do Until ActiveCell.Value = "" If ActiveCell.Value < 100 Then z = ActiveCell.Row Rows(z).Delete ActiveCell.Offset(-1, 0).Select Else End If ActiveCell.Offset(1, 0).Select Loop End Sub Thanks, "mike b" wrote: I would like the code for a macro that does the following: I have a spreadsheet with a header row and want to delete any rows that have a number in column 9 that is less than 100 -- Mike B |
number less than 100
Thanks, I will try that
Mike B "David" wrote: Hi Mike, See if this will work for you. Sub Macro1() Range("I1").Select Do Until ActiveCell.Value = "" If ActiveCell.Value < 100 Then z = ActiveCell.Row Rows(z).Delete ActiveCell.Offset(-1, 0).Select Else End If ActiveCell.Offset(1, 0).Select Loop End Sub Thanks, "mike b" wrote: I would like the code for a macro that does the following: I have a spreadsheet with a header row and want to delete any rows that have a number in column 9 that is less than 100 -- Mike B |
number less than 100
David,
Thanks it worked perfectly Mike "mike b" wrote: Thanks, I will try that Mike B "David" wrote: Hi Mike, See if this will work for you. Sub Macro1() Range("I1").Select Do Until ActiveCell.Value = "" If ActiveCell.Value < 100 Then z = ActiveCell.Row Rows(z).Delete ActiveCell.Offset(-1, 0).Select Else End If ActiveCell.Offset(1, 0).Select Loop End Sub Thanks, "mike b" wrote: I would like the code for a macro that does the following: I have a spreadsheet with a header row and want to delete any rows that have a number in column 9 that is less than 100 -- Mike B |
All times are GMT +1. The time now is 03:23 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com