+ Reply to Thread
Results 1 to 6 of 6

Select rows between Bold text to remove duplicates

  1. #1
    Registered User
    Join Date
    09-21-2012
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Lightbulb Select rows between Bold text to remove duplicates

    I have data imported into Excel (all text) which I am trying to clean up. All that is needed is the first column and I have already written VBA to remove columns and rows which are not needed. This leaves the data in column A which is a list of company names in bold with the products they have purchased listed below it. Immediately below is the next company and it's list and so on. There are 1,000s of rows of data.

    There are duplicates in each list of products under each company name. What I am trying to figure out is how to use VBA to select the non-bold items (between the bold company names), remove the duplicates, then move to the next non-bold list between company names. In essencese; continue looping through each company list to remove it's duplicates thoughout the column. Each company has it's own list, so selecting the entire column to remove duplicates would remove needed data.

    Sorry, I don't have any code to post as I don't know where to start. The code I have already written has nothing to do with this task and will only confuse the matter. Included is a simple file which shows how the data is entered in the sheet now.
    Attached Files Attached Files
    Charlie

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Select rows between Bold text to remove duplicates

    Hi,

    Attached is your solution. Run this on some real time data and check. Hope this helps.
    Attached Files Attached Files
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Registered User
    Join Date
    09-21-2012
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Select rows between Bold text to remove duplicates

    Xlbiznes,

    Thank you for the quick response. This worked great!

    It's interesting to see someone else's methods and how they achieve the task. Nice work.

    Thanks again.

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Select rows between Bold text to remove duplicates

    hi CharliRB, different option, press Run button
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Select rows between Bold text to remove duplicates

    Glad i could help.

    Please mark this thread as solved , if you are satisfied with the solution.

  6. #6
    Registered User
    Join Date
    09-21-2012
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Select rows between Bold text to remove duplicates

    Thank you, watersev. That is quiet and clean.
    Last edited by CharlieRB; 03-01-2013 at 12:02 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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