K
Ken
We have a workbook with data like the following (lower
case letters are just fillers):
A B
1 rrr
2 eee
3 SUMMARY
4 lll
5 ppp
6 STATION XYZ
7 kkk
8 SUMMARY
9 mmm
10 STATION AAA
The word "STATION" will have varying text after it in the
cell. The total number of rows will vary. The number of
rows between the words "SUMMARY" and "STATION" will vary.
We want our macro to delete the rows between the
words "SUMMARY" and "STATION" (inclusive) each time they
are found.
In the above example rows 8-10 and rows 3-6 would be
deleted.
We assume that we would start at the end and work up and
that we would be looking for "Left(A1,6) = "STATION"", but
can't figure out the code to make it happen.
TIA.
case letters are just fillers):
A B
1 rrr
2 eee
3 SUMMARY
4 lll
5 ppp
6 STATION XYZ
7 kkk
8 SUMMARY
9 mmm
10 STATION AAA
The word "STATION" will have varying text after it in the
cell. The total number of rows will vary. The number of
rows between the words "SUMMARY" and "STATION" will vary.
We want our macro to delete the rows between the
words "SUMMARY" and "STATION" (inclusive) each time they
are found.
In the above example rows 8-10 and rows 3-6 would be
deleted.
We assume that we would start at the end and work up and
that we would be looking for "Left(A1,6) = "STATION"", but
can't figure out the code to make it happen.
TIA.