+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Selective row critera +Delete Characters

  1. #1
    Registered User
    Join Date
    03-11-2010
    Location
    SHerwood
    MS-Off Ver
    Excel 2007
    Posts
    9

    Selective row critera +Delete Characters

    New to VBA obviously. I have a file about 20K rows deep. I need to find all rows that begin with 2010 and delete the first 43 characters of that row.

    Any help great appreciated.

    Reb
    Last edited by Rebel_42MDx; 03-11-2010 at 03:31 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Selective row critera +Delete Characters

    Care to post up a 30-40 row excerpt so we can accurately ascertain your goal? Perhaps BEFORE/AFTER sheets based on that short sample? Some people say rows when they mean columns, or even cells. Best if we just look at it.

    Click GO ADVANCED and use the paperclip icon to post up your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-11-2010
    Location
    SHerwood
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Selective row critera +Delete Characters

    Thanks for the help. Here are the "before" and "after" sheets. Thank you again as I am trying to learn VBA.
    Attached Files Attached Files

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Selective row critera +Delete Characters

    Hehe, see, looking at an actual sheet presents much clearer picture of the need. What you really want is a way to search for STORE: and delete all the characters in cell up to and including those characters, yes? Much simpler.

    This will do that:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-11-2010
    Location
    SHerwood
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Selective row critera +Delete Characters

    WOW! Works like a charm and runs very fast. You da' man!!! Thanks for your help and patience. As a CPA I'm trying to bridge the gap between VBA and crunching numbers.

    Thanks again!

    Reb

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Selective row critera +Delete Characters

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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