Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Delete Row if cell in column E is '1037'
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Paul  
View profile  
 More options Jan 9 2003, 3:09 pm
Newsgroups: microsoft.public.excel.programming
From: "Paul" <newspbrid...@uga.edu>
Date: Thu, 9 Jan 2003 15:01:58 -0500
Local: Thurs, Jan 9 2003 3:01 pm
Subject: Re: Delete Row if cell in column E is '1037'
Eagles, try this
Sub Delete_Rows()
' This macro deletes all rows on the active worksheet
' that have 1034, 1035, 1037 column E.
Dim rng As Range, cell As Range, del As Range
Set rng = Intersect(Range("E:E"), ActiveSheet.UsedRange)
For Each cell In rng
If (cell.Value) = "1034" _
Or (cell.Value) = "1035" _
Or (cell.Value) = "1037" Then
If del Is Nothing Then
Set del = cell
Else: Set del = Union(del, cell)
End If
End If
Next
On Error Resume Next
del.EntireRow.Delete
End Sub

--
Paul, ** remove news from my email address to reply by email **
Always remember to backup your date before trying something new
Using Excel '97

"Eagles!" <G...@noreply.com> wrote in message

news:3e1dcda6$0$21637$4c41069e@reader0.ash.ops.us.uu.net...
> Good morning.  Was hoping someone could help me with a small problem.  I
> have a rather large macro that feeds from a single data sheet of roughly
> 5,000 rows.  The problem is this - There are a few rows of data I'd like
to
> exclude prior to the macro manipulating the data.

> To be more specific, each row has a 4 digit product type in column E.
There
> are 3 product types I'd like excluded:  1034,1035 & 1037.

> How can I search the data, and eliminate the rows with these 3 product
> types?

> Thank you!

> Go Eagles!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.