+ Reply to Thread
Results 1 to 2 of 2

Remove data after last occurance

  1. #1
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    710

    Remove data after last occurance

    Hello, I have attached an example sheet.

    In K1 I have a value

    What I want a macro to do is search for the LAST occurrence of this in column A - and clear all data after it.

    So in this instance column A would match what is in Column O
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Remove data after last occurance

    Hello cmb80,

    This macro will do what you want.

    Please Login or Register  to view this content.
    NOTE: Because this is a Partial Match, you should include the Parentheses. E.g. the value in K1 should be (AUS).
    Last edited by Leith Ross; 10-12-2014 at 02:30 PM.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Find nth number of occurance of data in vlookup
    By rajansettu in forum Excel General
    Replies: 3
    Last Post: 09-08-2014, 09:13 AM
  2. collect data between first and second (last) occurance of a string
    By Royzer in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-11-2013, 11:25 AM
  3. [SOLVED] Copy data after every certain occurance
    By rizmomin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-30-2012, 10:01 AM
  4. How do I track frequency of occurance in data table?
    By Rowe280 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2005, 02:05 PM
  5. [SOLVED] Occurance of data in multiple columns
    By Jerry in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-12-2005, 11:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1