Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Deleting a Row or Rows

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Deleting a Row or Rows

There are a few ways Big H

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

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



"Big H" wrote in message ...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Deleting a Row or Rows

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
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
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Links and Linking in Excel 1 November 13th 08 08:44 AM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Setting up and Configuration of Excel 1 November 12th 08 06:05 PM
Macro for deleting rows and serialising the remaing rows Srinivasulu Bhattaram Excel Worksheet Functions 1 November 12th 08 01:39 PM
Help!!! I have problem deleting 2500 rows of filtered rows shirley_kee[_2_] Excel Programming 1 January 12th 06 03:15 AM
deleting hidden rows so i can print only the rows showing?????? jenn Excel Worksheet Functions 0 October 6th 05 04:05 PM


All times are GMT +1. The time now is 01:40 AM.

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

About Us

"It's about Microsoft Excel"