PC Review


Reply
Thread Tools Rate Thread

Deleting a Row or Rows

 
 
Big H
Guest
Posts: n/a
 
      23rd Oct 2006
Hi there,

hopefully someone can help, is it possible to delete a row based on a
certain criteria?

I have a dynamic range of data in columns A:J, within column H, the header
is Region, and the criteria is one of the following: North, South,East or
West. Anything that has West on Column H, I want that row or rows to be
deleted.

Is it possible to do this using code.

regards BigH


 
Reply With Quote
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      23rd Oct 2006
There are a few ways Big H

See
http://www.rondebruin.nl/delete.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Big H" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Hi there,
>
> hopefully someone can help, is it possible to delete a row based on a certain criteria?
>
> I have a dynamic range of data in columns A:J, within column H, the header is Region, and the criteria is one of the following:
> North, South,East or West. Anything that has West on Column H, I want that row or rows to be deleted.
>
> Is it possible to do this using code.
>
> regards BigH
>



 
Reply With Quote
 
=?Utf-8?B?Q2hhZEY=?=
Guest
Posts: n/a
 
      23rd Oct 2006
Hi 'Big H'

might want to consider the following:

public sub zapWest()
Dim WestIter as Range

set WestIter = Cells(Range("H1").row, Range("H1").column)

Do while trim(WestIter.text) <> ""
if trim(WestIter.text) Like "[wW]est" then
Rows(WestIter.row).delete
end if

set WestIter = WestIter.Offset(1, 0)
Loop


end sub


Hope this helps.

Chad



"Big H" wrote:

> Hi there,
>
> hopefully someone can help, is it possible to delete a row based on a
> certain criteria?
>
> I have a dynamic range of data in columns A:J, within column H, the header
> is Region, and the criteria is one of the following: North, South,East or
> West. Anything that has West on Column H, I want that row or rows to be
> deleted.
>
> Is it possible to do this using code.
>
> regards BigH
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
deleting blank rows for up to 60000 rows of data gbpg Microsoft Excel Programming 3 27th Dec 2009 08:37 PM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Microsoft Excel Programming 2 13th Nov 2008 01:32 PM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Microsoft Excel Worksheet Functions 1 12th Nov 2008 01:39 PM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Microsoft Excel Discussion 1 12th Nov 2008 01:32 PM
Excel 2000 VBA Deleting Rows when certain text in rows exists scain2004 Microsoft Excel New Users 1 15th Mar 2004 02:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:26 PM.