Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sumif number is greater than a number but less than another number lulu151 Excel Discussion (Misc queries) 2 May 7th 10 07:12 PM
How can I click on a telephone number in an Excel 2002 spreadsheet, and have the number dialed? jbclem Excel Discussion (Misc queries) 2 August 13th 09 01:57 AM
How to calculate number of occurencies of a specific number number Stefan Excel Discussion (Misc queries) 4 September 8th 08 08:33 AM
Formula to change scientific number to regular number or text Compare Values Excel Discussion (Misc queries) 2 August 23rd 07 06:10 PM
Rounding a number to a multiple quantity that adds to a fixed total number wjlo Excel Worksheet Functions 1 November 9th 04 04:43 PM


All times are GMT +1. The time now is 06:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"