+ Reply to Thread
Results 1 to 13 of 13

Combine and consolidate date with multiple column criteria

  1. #1
    Registered User
    Join Date
    07-12-2018
    Location
    Exeter
    MS-Off Ver
    Office 2016
    Posts
    6

    Combine and consolidate date with multiple column criteria

    Hi All,

    I have been trying to solve this problem for a while, but have yet to get a good solution, hopefully someone can help?

    I have a list of sizes/quantities:

    data.png

    There are many duplicates in this list, and potentially there can be 100's of lines. The idea is to consolidate and sum the quantity based on matches in Part No, Thickness, width & length... With the final result looking something like:

    datasorted.png

    The process needs to be macro, VBA or even database driven (as this information is exported to Access as part of existing processes).

    Sorry I do not have access to attach anything or link the sample file.

    Many thanks for any help.

    Matt

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,843

    Re: Combine and consolidate date with multiple column criteria

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Combine and consolidate date with multiple column criteria

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    07-12-2018
    Location
    Exeter
    MS-Off Ver
    Office 2016
    Posts
    6

    Re: Combine and consolidate date with multiple column criteria

    Thanks for the upload instructions, hopefully now attached?

    Thanks

    Matt
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,843

    Re: Combine and consolidate date with multiple column criteria

    Can't you just use the remove duplicates option on the data ribbon? If you need VBA, then I will move your thread - please confirm.

    Could also be done with PowerQuery.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Combine and consolidate date with multiple column criteria

    I just noticed you want VBA. I'm hopeless with VBA (strictly a formula guy), so I'm out. But at least you have a sample sheet now. Others will step in.

  7. #7
    Registered User
    Join Date
    07-12-2018
    Location
    Exeter
    MS-Off Ver
    Office 2016
    Posts
    6

    Re: Combine and consolidate date with multiple column criteria

    I did not think that removing duplicates would actually sum the quantity field for identical each line?

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,843

    Re: Combine and consolidate date with multiple column criteria

    No, sorry - I missed that! Can be done with PowerQuery.

    You were meant to provide the AFTER in your file as well as the BEFORE!!!

  9. #9
    Registered User
    Join Date
    07-12-2018
    Location
    Exeter
    MS-Off Ver
    Office 2016
    Posts
    6

    Re: Combine and consolidate date with multiple column criteria

    Thanks AliGW, I've not come accross that plugin, but a quick google search shows it is downloadable from MS, will have a play!

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,843

    Re: Combine and consolidate date with multiple column criteria

    Have a play with the attached.

    M code generated in PQ:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,843

    Re: Combine and consolidate date with multiple column criteria

    You should have it already in Office 2016, I think - check your data ribbon for Get & Transform.

  12. #12
    Registered User
    Join Date
    07-12-2018
    Location
    Exeter
    MS-Off Ver
    Office 2016
    Posts
    6

    Re: Combine and consolidate date with multiple column criteria

    Yepp, just realised that haha!

    That looks like it will do the trick nicely, many thanks for your help!

    Matt

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,843

    Re: Combine and consolidate date with multiple column criteria

    No problem. Get into PQ and you will never look back.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. [SOLVED] Consolidate data in multiple rows and combine it in another worksheet
    By Bubbles_A in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-21-2018, 09:21 AM
  2. How to consolidate rows based on MULTIPLE criteria?
    By MikkelR in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-31-2017, 05:51 AM
  3. Combine 2 Macros to Consolidate Data from Multiple Sheets and then Delete Blank Rows
    By butler1012 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-22-2015, 07:33 PM
  4. Combine multiple rows in a specific column based on matching criteria? VBA solution?
    By hopegriffin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2015, 07:11 PM
  5. Combine and Consolidate from Multiple Worksheets
    By Kicks in forum Excel General
    Replies: 3
    Last Post: 01-26-2015, 09:35 PM
  6. Consolidate from column to row on criteria
    By Steve N. in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-28-2013, 09:53 PM
  7. Combine multiple columns into one column with header and date in another column
    By JJadams in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-12-2012, 05:30 PM

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