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
|