If row starts with X, delete 11 rows

gxm204

New Member
Joined
Nov 20, 2015
Messages
29
Hello, I am working on cleaning a PDF file with a header that I don't want to include in my text analysis. Each page begins with the phrase "Page X of Y," followed by 10 more lines of header information.

The program I envision would have VBA find each cell that starts with the word "Page."

Then delete that row plus the following 10 rows (total of 11 rows).

This sounds like a good use of VBA but I am too new to write it myself! Thank you all very much.

Best,
George
 
The user was happy with my script. And this script runs using a loop also.

My Aswer Is This,

That is correct concerning the first part of the above quote.

But, my new code will only loop thru those entries in column A that begin with Page, and, not from the last row of column A, up.
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Wow, this is really good stuff, Christmas came early! Thanks so much for your help.

gxm204,

Thanks for the feedback.

You are very welcome. Glad we could help.

And, come back anytime.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,390
Members
449,445
Latest member
JJFabEngineering

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top