+ Reply to Thread
Results 1 to 4 of 4

Summation of Quantities for Duplicate Part Numbers - VBA Help please

  1. #1
    Forum Contributor
    Join Date
    06-13-2009
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    245

    Smile Summation of Quantities for Duplicate Part Numbers - VBA Help please

    Hello, could someone please help me with a VBA solution to my following Excel 2003 problem:

    Please find attached a copy of my Duplicates.xls spreadsheet (contains dummy data only).

    What I need please is for Excel VBA to lookup duplicates in column C and to sum the quantities against these duplicates that are shown in column F. The summation figure needs to be populated in column Q against the first instance of the duplicate showing in column C. All the remaining duplicate rows need to be deleted.

    For example:

    In cell C2 and C3 shows duplicate Part Numbers. The sum of the Qty Rx is 1

    This summation figure needs to be populated into cell Q2

    Row 3 needs to be deleted

    Another example:

    In cells C22, C23 and C24 show duplicate Part Numbers. The sum of the Qty Rx is 2

    This summation figure needs to be populated into cell Q22

    Rows 23 and 24 need to be deleted

    Last example:

    In cells C37, C38 and C39 show duplicate Part Numbers. The sum of the Qty Rx is 0

    This summation figure needs to be populated into cell Q37

    Rows 38 and 39 need to be deleted

    If this does not make sense, please let me know.

    Any help would be greatly appreciated.

    Kind regards,

    Chris
    Attached Files Attached Files

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Summation of Quantities for Duplicate Part Numbers - VBA Help please

    If you only need to sum values of Column F (not E) use this macro-
    Please Login or Register  to view this content.
    If you want to sum values for Column E also-
    Please Login or Register  to view this content.
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Summation of Quantities for Duplicate Part Numbers - VBA Help please

    Here's another one for what it's worth. I uses a different method.

    Please Login or Register  to view this content.
    The values in column F didn't sum to match example #3. I'm guessing you summed column E values?
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Forum Contributor
    Join Date
    06-13-2009
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    245

    Re: Summation of Quantities for Duplicate Part Numbers - VBA Help please

    Thank you both sourabhg98 and AlphaFrog for all your wonderful hard work and efforts in providing me with a working solution to my problem - very grateful and appreciative.

    Cheers,

    Chris

+ 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] Compare Part Numbers & Quantities Same Workbook Different Cells
    By agengler11 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-28-2014, 09:52 AM
  2. [SOLVED] Alternate Highlighting Rows of Duplicate Part Numbers
    By cbritton796 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-27-2013, 12:41 PM
  3. Replies: 5
    Last Post: 10-23-2012, 11:44 PM
  4. Need help summing quantities of numerous duplicate entries
    By luthierwnc in forum Excel General
    Replies: 6
    Last Post: 07-02-2012, 11:53 AM
  5. finding new and duplicate part numbers
    By caligula7001 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-13-2010, 10:17 AM
  6. a two-part summation
    By mikepingers in forum Excel General
    Replies: 5
    Last Post: 09-05-2008, 11:35 AM
  7. [SOLVED] Finding duplicate entries with matching lengths, total the quantities, delete the extras
    By RShow in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2005, 06:05 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