+ Reply to Thread
Results 1 to 7 of 7

Add Quantity of Redundant Rows, then Delete Redundant Rows

  1. #1
    Registered User
    Join Date
    01-13-2011
    Location
    Bay Area, CA
    MS-Off Ver
    Excel 2007
    Posts
    43

    Add Quantity of Redundant Rows, then Delete Redundant Rows

    Hi All!

    I'm trying to combine multiple lists of things people want (such as multiple grocery lists of items and their quantities). I'd like to create a vba code that sorts the lists from A-Z (to get the redundant items next to one another), add the quantities of the items, then delete the redundant rows.

    For example:

    Person A wants:
    Item QTY
    Apple 2
    Bananas 2
    Oranges 2

    Person B wants:
    Item QTY
    Apple 1
    Bananas 3
    Oranges 1
    Pineapples 2


    And want my list to end up like this:
    Item QTY
    Apple 3
    Bananas 5
    Oranges 3
    Pineapples 2

    Noting that the order may not always be alphabetical and the number or type of items they want may not be the same either.

    If there's a more succinct way of accomplishing my same goal I'm all ears! I appreciate all your guys' help in advance! Thanks!
    Last edited by alexwgordon; 12-20-2011 at 10:57 PM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Add Quantity of Redundant Rows, then Delete Redundant Rows

    Hi Alex,

    If you have a master list of the products, then this can easily be created - using formula or VBA where the quantities will show up against each product based on the preference of various person(s). If you want VBA solution, then you need to specifiy which sheet / range contains these individual list and where do you want the master list to be compiled and housed. I believe little home work is what you need to do here.

    If possible, upload a sample workbook.

    Cheers

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    01-13-2011
    Location
    Bay Area, CA
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: Add Quantity of Redundant Rows, then Delete Redundant Rows

    Hi dilipandey!

    It's possible there would be a master list, but let's say there is no master list and all that is given is something like the sample workbook attached.

    Cheers!
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-13-2011
    Location
    Bay Area, CA
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: Add Quantity of Redundant Rows, then Delete Redundant Rows

    I did however find this thread on ozgrid that does something similar to what I'm looking for, however I have an additional column that needs to be added together (the quantities of the items repeated). Hopefully this helps a bit in answering my question. Thanks guys!

    http://www.ozgrid.com/forum/showthread.php?t=81988

    Also, I think it's okay to post this link based on forum rules, but if I'm in the wrong here please let me know!

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Add Quantity of Redundant Rows, then Delete Redundant Rows

    Hi Alex,

    See the attached file with required macro to solve your purpose.

    Let me know if this helps.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-13-2011
    Location
    Bay Area, CA
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: Add Quantity of Redundant Rows, then Delete Redundant Rows

    Hi DILIPandey!

    That's absolutely perfect for what I'm looking for! Thank you so much! Star!

  7. #7
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Add Quantity of Redundant Rows, then Delete Redundant Rows

    You are welcome Alex... !!

    Cheers

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

+ 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