Quantcast
Channel: Active questions tagged row - Stack Overflow
Viewing all articles
Browse latest Browse all 447

How to delete a certain number of rows occurring after a particular character using Excel VBA

$
0
0

I have a worksheet that contains three useless rows (containing text) sandwiched between two cells containing ------------ each, after a differing number of rows of useful data.

The occurrence of those useless rows is not uniform meaning at some points, they occur after eight rows of useful data, sometimes after nine, etc.

I need to remove those useless rows but the worksheet is quite large.

I have written the following:

Application.ActiveSheet.Select("------------")Range(Selection).Rows(1:3).Delete

How can I select then delete 3 rows occurring between two cells containing ------------?


Viewing all articles
Browse latest Browse all 447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>