Macro that deletes all rows that does not contain ## or **

mingandmong

Active Member
Joined
Oct 15, 2014
Messages
339
Hi
I'm using excel 2010

I need a macro that deletes all rows after row 10 that does not contain these special characters as shown

## and ** that are always on separate rows on a data log file I just need to strip all redundant data

Thank-you in advance
 
Hi Peter
THankyou for re-looking at the macro
unfortuanley i recieve a debug... a compile error invalid outside procedure
if i can be of any more assistance or help you more to identify the issue then please ask
thankyou for your valuable time and pationce
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
When you get that message, something in the vba window should get selected/highlighted blue. I think you must have some other line(s) of code other than what I posted, or else you missed a bit of my code when you copied it from the forum.
 
Upvote 0
Peter

End Sub is in blue

There is only your code and no other macros i have pasted the code again, and still the same End Sub is highlighted blue
 
Last edited:
Upvote 0
Sounds like you have some stray code somewhere. I just re-copied the code from the forum back into my sheet & it is working fine.
Suggest test by closing all your workbooks, start a fresh one, copy/paste the code from the forum and test. For the test, it doesn't even matter if there is no data in the sheet, but you could put some in if you want.
 
Last edited:
Upvote 0
Hi Peter
Closed the book re-opend and re-pasted, your a genious thank-you for all your hard work, much apprecieted that you spend time helping us unfortuante people to better oursleves
 
Upvote 0
Hi Peter
Closed the book re-opend and re-pasted, your a genious thank-you for all your hard work, much apprecieted that you spend time helping us unfortuante people to better oursleves
Glad you got it sorted & you are welcome. People did the same for me when I was staring out, so I understand what you are saying. :)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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