+ Reply to Thread
Results 1 to 12 of 12

Find duplicate order IDs, then add shipping together (several columns to the right)

  1. #1
    Registered User
    Join Date
    10-08-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    26

    Find duplicate order IDs, then add shipping together (several columns to the right)

    I have a fairly urgent need to to have excel 'hunt' down column A for duplicate entries (order IDs), & then when it finds duplicate order IDs ...to add any values for the shipping cost together (these shipping costs are in column S).

    A picture is worth a thousand words...

    \1


    Can anyone get me started? (please?!!!)

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Find duplicate order IDs, then add shipping together (several columns to the right)

    "A picture is worth a thousand words..."

    Not on an Excel forum! Practically worthless! Kindly consider uploading an actual workbook.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    10-08-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Find duplicate order IDs, then add shipping together (several columns to the right)

    A good point well made...please find attached (temp.xlsx)

    I need Excel to hunt down column 'A' looking for successive duplicates (which in the attachement are highlighted with a pink background), then when it finds a duplicate, if there are an numbers in the shipping column, then to add these all up & place the sum on the last entry row.

    It'd be grand if someone could get me started....

    Many thanks,
    Hank.
    Attached Files Attached Files

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Find duplicate order IDs, then add shipping together (several columns to the right)

    Just as an idea. In C2 and copy down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Registered User
    Join Date
    10-08-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Find duplicate order IDs, then add shipping together (several columns to the right)

    Hello Fotis,

    Many thanks for the input...my apologies - I've confused you ....the final column with the <- in it was just for commenting purposes.

    I therefore removed the "<-" aspect of your formula - it almost works (thanks )....indeed it does work if there are only two duplicates, but if there are three or four duplicate...the totalling of the associated shipping doesn't work. (I should have said there may be duplicates in twos, threes...possibly as high as eight duplicate entries in column A ...alas the number of duplicates will be random & not know beforehand).

    I've attached an example with scenarios that I mention (ie where more than one duplicate exists that all need totalling)...it'd be great if you could mull it with a view to a solution :-)

    regards,
    Hank.
    Attached Files Attached Files
    Last edited by HankMcSpank; 02-26-2014 at 08:17 AM.

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Find duplicate order IDs, then add shipping together (several columns to the right)

    Hi,

    So you only want results to appear if the Order ID appears more than once in that column?

    If so, in C2 and copy down:

    =IF(COUNTIF($A$2:$A$40,A2)=1,"",SUMIF($A$2:$A2,A2,$B$2:$B2))

    Regards

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Find duplicate order IDs, then add shipping together (several columns to the right)

    Perhaps

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    10-08-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Find duplicate order IDs, then add shipping together (several columns to the right)

    Xor lx...thanks, that works ...but it keeps the original shipping (as opposed to zero'ing/clearing them & keeping only the summ'ed amount as the last row entry)

    Fotis - yay, that works a treat .....many thanks! (is there any reason I get a thick black format border around the cells that are doing the calculations?!)

    You guys rock (this solves a real big headache for me)

  9. #9
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Find duplicate order IDs, then add shipping together (several columns to the right)

    You are welcome and thanks for the feed back.

    As that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED,as per Forum Rule #9. Thank you.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  10. #10
    Registered User
    Join Date
    10-08-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Find duplicate order IDs, then add shipping together (several columns to the right)

    Actually, I've just noticed that for all the proposed solution does indeed total up duplicate order ID postages in column B, the solution unfortunately ignores any postage that aren't duplicate order IDs (therefore there's nothing in the final column - my fault for not being specific enough!)

    Can that formula can be tweaked to place whatever postage total is (duplicates or not) into column 'C'

    Therefore if there are duplicates order IDs (column A) ....add the postages for the same order ID together ....if there aren't any duplicate order IDs, then just place the related postage value into the final column ...ultimately I seek one column which has the correct postage totals for each order.


    Example file attached.

    Many thanks!
    Attached Files Attached Files
    Last edited by HankMcSpank; 03-02-2014 at 05:55 PM.

  11. #11
    Registered User
    Join Date
    10-08-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Find duplicate order IDs, then add shipping together (several columns to the right)

    If it helps matters, I've just noticed that in the (long) spreadsheet I dragged the formula fotis provided, all the way down column C...
    Please Login or Register  to view this content.
    ...somewhat whackily exhibits the correct outcome I require after about 15 rows down! (in other words non duplicate order ID postages show in the results column too).....how can this be?!!!

  12. #12
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Re: Find duplicate order IDs, then add shipping together (several columns to the right)

    A pivot table provides a very simple solution to this. See the "Pivot" TAB attached.
    Attached Files Attached Files

+ 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] Find duplicate values in within 2 columns
    By bigroo1958 in forum Excel General
    Replies: 2
    Last Post: 01-13-2014, 10:42 AM
  2. Removing duplicate in from two columns not in order.
    By bisalk in forum Excel General
    Replies: 5
    Last Post: 10-02-2013, 03:24 AM
  3. Replies: 0
    Last Post: 04-10-2012, 12:39 PM
  4. Find duplicate info in two columns and copy info from duplicate rows
    By USGS in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-12-2011, 07:31 PM
  5. Find Duplicate from Different Columns
    By 1apple in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-02-2007, 02:55 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