Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sumif number is greater than a number but less than another number | Excel Discussion (Misc queries) | |||
How can I click on a telephone number in an Excel 2002 spreadsheet, and have the number dialed? | Excel Discussion (Misc queries) | |||
How to calculate number of occurencies of a specific number number | Excel Discussion (Misc queries) | |||
Formula to change scientific number to regular number or text | Excel Discussion (Misc queries) | |||
Rounding a number to a multiple quantity that adds to a fixed total number | Excel Worksheet Functions |