+ Reply to Thread
Results 1 to 2 of 2

Marco/VBA to remove and replace group of text

  1. #1
    Registered User
    Join Date
    07-10-2015
    Location
    USA
    MS-Off Ver
    2004
    Posts
    4

    Marco/VBA to remove and replace group of text

    Good day everyone!

    I am currently in the process of reorganizing an excel sheet containing in-house stock and acceptable brands. I have to remove the portion "Alternate Option" from the entire worksheet and replace it with the actual item name.

    Here is an example of what I have right now. (The asterisks indicates a blank row and there are populated columns to the left and right of this column that CANNOT be changed.

    **********
    Tape
    Alternate Option
    Alternate Option
    Alternate Option
    **********
    Pen
    Alternate Option
    Alternate Option
    **********

    This setup goes on on for about 15,000 rows and doing this manually, is out of the question.

    What I'm trying to figure out, if there's a way to to have a script do this for me so my end result would look like this;

    **********
    Tape
    Tape
    Tape
    Tape
    **********
    Pen
    Pen
    Pen
    **********


    My idea is to have the script say something like; (Note: Each set of data may contain many alternate options while there are some that don't contain any.

    if (row equals empty/null (not sure what is used) && next row is not Alternate Option);
    replace following "Alternate Option" with row until new blank row is met


    If anyone can help me out here, that would be awesome!!

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Marco/VBA to remove and replace group of text

    nsarzyn,

    Can you post a workbook that has some sample data, if possible also put a sheet in it with the expected outcome? Getting a visual will help better understand the setup and desired outcome.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

+ 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. Need help for remove row A & format cell on row G of marco
    By marll in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-21-2015, 11:03 PM
  2. conditional Marco to group rows if value = #
    By petit_Fleur in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-12-2014, 09:00 AM
  3. Replace a number with text if it lies within a range/group
    By BPSJACK in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 12-18-2012, 02:36 AM
  4. Auto Find/Replace + Marco sort?
    By mikeyfear in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-03-2008, 08:28 PM
  5. [SOLVED] DIY Excel Marco Beginner needs help with 'replace'
    By Greg in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-29-2006, 10:10 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