+ Reply to Thread
Results 1 to 11 of 11

SUMIF with 2 unique records - urgh!

  1. #1
    Registered User
    Join Date
    07-09-2019
    Location
    Little Rock, AR
    MS-Off Ver
    2016
    Posts
    5

    SUMIF with 2 unique records - urgh!

    I've got 3,000 row spreadsheet where I need to sum a column IF there is a new value in in 2 other columns. Example:

    A B c
    Huey apple 10
    Huey apple 10
    Huey orange 25
    Dewey apple 30
    Dewey apple 30
    Dewey orange 15
    Louie apple 40
    Louie orange 3

    so the total should be 10+25+30+15+40+3

    any ideas?

  2. #2
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: SUMIF with 2 unique records - urgh!

    A
    B
    C
    D
    E
    1
    Huey apple
    10
    2
    Huey apple
    10
    123
    3
    Huey orange
    25
    4
    Dewey apple
    30
    5
    Dewey apple
    30
    6
    Dewey orange
    15
    7
    Louie apple
    40
    8
    Louie orange
    3



    E2=SUM(IF(FREQUENCY(IF(A1:A8&B1:B8<>"",MATCH($A$1:$A$8&$B$1:$B$8,$A$1:$A$8&$B$1:$B$8,0)),ROW($A$1:$A$8)-ROW($A$1)+1),C1:C8))

    Control+Shift+Enter

  3. #3
    Registered User
    Join Date
    07-09-2019
    Location
    Little Rock, AR
    MS-Off Ver
    2016
    Posts
    5

    Re: SUMIF with 2 unique records - urgh!

    WHOA and grazie! That is quite a formula. However, with 3K columns, I need a formula for a total of column C and not a total per row. Any other ideas Caracalla? ma molte grazie l'aiuto!

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: SUMIF with 2 unique records - urgh!

    But that is what CARACALLA's formula does
    so the total should be 10+25+30+15+40+3
    =123

    CARACALLA formula)=123

    What am I missing?
    Dave

  5. #5
    Registered User
    Join Date
    07-09-2019
    Location
    Little Rock, AR
    MS-Off Ver
    2016
    Posts
    5

    Re: SUMIF with 2 unique records - urgh!

    I must not have explained it well enough, because I get a #VALUE! error. I don't know why. I even tried his formula in a new spreadsheet with the example, and I got the same error.
    Last edited by mgavin; 07-09-2019 at 06:49 PM.

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: SUMIF with 2 unique records - urgh!

    That formula is an array formula and must be committed from edit mode with Ctrl + Shift + Enter and not just Enter.

    You will know it is properly committed when you see curly braces {} around the formula in the formula bar. You do not type those in yourself. If you do you will get an error. Excel puts them in for you.

  7. #7
    Registered User
    Join Date
    07-09-2019
    Location
    Little Rock, AR
    MS-Off Ver
    2016
    Posts
    5

    Re: SUMIF with 2 unique records - urgh!

    I am just BLOWN away. Y'all are the BOMB!!!! MILLE GRAZIE!

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: SUMIF with 2 unique records - urgh!

    Glad to hear it works.

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

  9. #9
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: SUMIF with 2 unique records - urgh!

    I am also amazed by the formula and it does what was asked, but if I change the third record to Huey apple 25, it returns 98. As it only sums the first record. However should it still be 123?

    Only the asker can answer and this may be impossible to happen so irrelevant!

    I guess it depends if the repeated records include their value as part of the uniqueness!

  10. #10
    Registered User
    Join Date
    07-09-2019
    Location
    Little Rock, AR
    MS-Off Ver
    2016
    Posts
    5

    Re: SUMIF with 2 unique records - urgh!

    Yes, the formula works for what I needed. thanks again. moving to solved.
    Last edited by mgavin; 07-10-2019 at 02:50 PM.

  11. #11
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: SUMIF with 2 unique records - urgh!

    A
    B
    C
    D
    E
    1
    Huey apple
    10
    2
    Huey apple
    10
    123
    3
    Huey apple
    25
    4
    Dewey apple
    30
    5
    Dewey apple
    30
    6
    Dewey orange
    15
    7
    Louie apple
    40
    8
    Louie orange
    3










    123 again IF



    E2=SUM(IF(FREQUENCY(IF(A1:A8&B1:B8&C1:C8<>"",MATCH(A1:A8&B1:B8&C1:C8,A1:A8&B1:B8&C1:C8,0)),ROW($A$1:$A$8)-ROW(A1)+1),C1:C8))

    Control +shift +enter

+ 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. Get Unique Records
    By Liju144 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-05-2017, 11:53 AM
  2. Replies: 5
    Last Post: 04-30-2013, 07:42 PM
  3. [SOLVED] Comparing records to result in a list of unique records
    By greenmat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-17-2013, 07:45 PM
  4. Unique values and Unique Records
    By rjbautista20 in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 04-25-2012, 05:12 AM
  5. Filter unique records only: Want the last records, not the first
    By davelarue in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-11-2009, 08:51 AM
  6. Unique records
    By geomcleod in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-08-2008, 02:08 PM
  7. unique filter results in some non-unique records.
    By Serials Librarian in forum Excel General
    Replies: 2
    Last Post: 05-26-2006, 05:10 PM

Tags for this Thread

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