LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Macro to delete rows until a row contains a certain text string

Hi Andy,

Can you post the code for finding the starting cell? Need to determine what
method to use to identify the row number.

I am assuming that you want to delete all rows from one row after the
starting cell to one row before the row containing "KM In". Is this
assumption correct?

--
Regards,

OssieMac


"Andy Rigby" wrote:

Hi All

Sorry I am fairly new to programming Excel. I am currently using Excel 2003.
I need to use macro/vba code to, delete rows from a worksheet (these rows
may or may not contain data or text strings) and I need it to stop at a row
that contains certain data (the text string "KM In"). I don't have a
particular range I can use in a macro as each worksheet this routine will be
applied to has different numbers of rows that need removing, but there will
be a starting cell which I have already worked out how to get to.

So basically from that starting cell I need to remove the following rows
until a row containing the text string "KM In" is reached and then the
routine needs to stop.

Any help or suggestions would be gratefully received.

Kind regards
Andy
Cairns, Australia

 
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 to delete ROWS in a spreadsheet using Text file Argus Rogue Excel Programming 6 July 1st 08 02:18 AM
Macro to merge text and delete rows nospaminlich Excel Programming 2 January 18th 08 03:16 PM
VBA macro to delete rows that contain text Rod from Corrections Excel Programming 2 January 25th 07 07:36 PM
Macro to delete rows with text cells zsalleh Excel Programming 8 August 27th 04 12:22 AM
Macro to delete last charcter in a text string Brian Excel Programming 2 July 24th 03 03:43 AM


All times are GMT +1. The time now is 02:42 AM.

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"