+ Reply to Thread
Results 1 to 12 of 12

Formula to merge similar Data

  1. #1
    Registered User
    Join Date
    12-09-2009
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    68

    Formula to merge similar Data

    I am trying to figure out a clever way to merge this data without losing any information (this may be a simple solution that I am just nto thinking of).

    Basically, I have a list of keywords and many of them repeat. They are all in categories, sometimes in differnt top level categories.

    What I am trying to do is:
    The keyword allergy (row 2) has 210 visits per month and is in the category Food.
    row 3 is the same info but has an additional sub category of Food & Food information
    row 4 again is the same with an additional sub category Baking and Spices
    etc.

    the problem is, of rows 2,3,4, and 5, I really only want 5 since it provides the most information. But that being said, I dont want to loose the other ways that keyword is being categorized. Meening, I still want to see row 6.

    Anyone have a clever merging formula that can do this?
    Attached Files Attached Files
    Last edited by NBVC; 12-22-2011 at 11:52 AM.

  2. #2
    Registered User
    Join Date
    12-09-2009
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Formula to merge similar Data

    No one has any ideas?!?!?

  3. #3
    Forum Contributor
    Join Date
    01-11-2011
    Location
    Frederick, MD, USA
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Formula to merge similar Data

    I'm confused as to exactly what you want. Are you saying that, for each different keyword, you'd like to see only the row that has the most sub-categories listed? In your example sheet, that would be rows 5, 13, and 21...?

  4. #4
    Registered User
    Join Date
    12-09-2009
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Formula to merge similar Data

    Yes, however don't forget row 6, 7, 10, 14, etc.

    Basically, every-time there is something unique about it, I want it to show. But I want it to show the deepest of that variation.

    I awnt to eliminate redundancy.

    In the example I sent, row 5 encorporates row 4, row 3 and row 2 so those arent necessary. What I am looking for is a formula that can merge everything in that way.

    Anyone have any thoughts?

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Formula to merge similar Data

    Okay, what about different keywords ie. rows 5 and 13. You would want both of them kept? Why is there a 28 in B18 instead of a 36? Is that a typo?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  6. #6
    Registered User
    Join Date
    12-09-2009
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Formula to merge similar Data

    Yes I would want both of thsoe kept and I believe that is a typo... it should be consistent.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula to merge similar Data

    Maybe a bit too basic.. but who knows...just a guess...

    Assuming you only have the 3 subcategories...using a couple of helper columns...

    In G2 copied down:

    =SUMPRODUCT(COUNTIF(D2:F2,D1:F1))

    in H2 copied down:

    =OR(G2=2,AND(G1=2,G2=1),AND(G1<>"",G1=0,G3=0))

    then filter for FALSE and delete those rows...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  8. #8
    Forum Contributor
    Join Date
    01-15-2010
    Location
    Jhb, South Africa
    MS-Off Ver
    2007, 2010, 2016
    Posts
    275

    Re: Formula to merge similar Data

    Hi afriedman,

    I do not see your example that you attached, can you attached it again so I can have a look.
    Jacques


  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula to merge similar Data

    This post is from February 2011!

  10. #10
    Registered User
    Join Date
    12-09-2009
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    68

    Re: Formula to merge similar Data

    Its true this is old and its solved as well.
    NBVC, I tried to edit the first post to mark as solved but I dont see that option. Any advice?

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula to merge similar Data

    Done. Thanks.

  12. #12
    Forum Contributor
    Join Date
    01-15-2010
    Location
    Jhb, South Africa
    MS-Off Ver
    2007, 2010, 2016
    Posts
    275

    Re: Formula to merge similar Data

    Solved already,

    Alright, I just thought that with the thread still being open and no reference is made to it being solved, that, well, it is not solved yet.

    But good, glad to hear it is...

+ 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