Sub to delete rows  after key word

Posted on 2011-05-13
Last Modified: 2012-05-11
I have a spreadsheet, which has a key word called "SYSTEMICS" (Highlighted Yellow)

I want to be able to delete all rows after that word is found.

I have attached an example, it is always in ColB

Question by:Seamus2626
    LVL 31

    Expert Comment

    by:Rob Henson
    Does it have to be VBA?

    A helper column with a count of occurences of the word in cells above will show which to delete.

    Assuming column C is available enter in C2


    Copy down for extent of data.

    AutoFilter on this column for greater than zero and delete the rows showing in the filter.

    LVL 6

    Accepted Solution

    please look at file with macro

    Kr Eric

    Author Closing Comment

    Hi robhenson, i needed vba code for this as i need it to run as a procedure

    Thanks Zwiekhorst


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Sometimes we don't want to show zeros in our Excel spreadsheets. This is sometimes most evident in our charts. Look at the chart below, all the zero values are visible. I think that all will agree with the fact that zero values are not looking nice …
    Introduction This Article is a follow-up to my Mappit! Addin Article (, it was inspired by an email posting I made to EUSPRIG (, I will briefly cover: 1) An overvie…
    The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
    This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now