+ Reply to Thread
Results 1 to 8 of 8

SUMIF Formula works but giving too many results

  1. #1
    Registered User
    Join Date
    09-26-2014
    Location
    Boston
    MS-Off Ver
    2010
    Posts
    63

    SUMIF Formula works but giving too many results

    I am currently Using the SUMIF formula to add numbers in Column B that match names in Column A. I am using =SUMIF(A:A,A2,B:B) and dragging the box down after the formula spits out the first response. This works great except if I have 5 names that match in Column A the formula will give me the same number answer 5 times in column C. Is there a way to prompt the formula to only give me 1 answer in column C per matching name? Am I making sense? Thanks so much guys and gals.

  2. #2
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: SUMIF Formula works but giving too many results

    TRy this one will return the 1st match

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click just below left if it helps, Boo?ath?

  3. #3
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: SUMIF Formula works but giving too many results

    In C2, enter:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Copy down.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  4. #4
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: SUMIF Formula works but giving too many results

    Another alternative,

    =IFERROR(IF(COUNTIF(A$1:$A1,A1)=1,1,"")*SUMIF(A:A,A1,B:B),"")
    Last edited by Speshul; 09-26-2014 at 10:35 AM.
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: SUMIF Formula works but giving too many results

    here are 3 ways
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: SUMIF Formula works but giving too many results

    That sample file has a pretty misleading title.

  7. #7
    Registered User
    Join Date
    09-26-2014
    Location
    Boston
    MS-Off Ver
    2010
    Posts
    63

    Re: SUMIF Formula works but giving too many results

    Thanks for the quick responses everyone. I ended up using =IF(COUNTIF($A$1:$A2,$A2)=1,SUMIF($A:$A,$A2,$B:$B),"") and it works great on the template i created. When I try to change the letters to X and Y (This is where the data is on my actual business spreadsheet) and the numbers to 6 and 7 It puts the final number one cell too high. For instance if cells x10,x11,x12 all match the formula spits out the sum on cell x9. Obviously I made a mistake in transferring the formula should I change the formula to? It is currently at =(COUNTIF($Y$6:$Y7,$Y7)=1,SUMIF($Y:$Y,$Y7,$X:$X),"")

  8. #8
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: SUMIF Formula works but giving too many results

    cut(Control + X) the formula and paste to the row you need the answer it is displaying.

+ 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] Correct Formula not giving results
    By NJ007 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-25-2014, 09:06 PM
  2. [SOLVED] Master formula sheet works but is giving #NUM for data worksheet
    By Gavalar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-04-2014, 12:03 PM
  3. Formula giving unexpected results
    By johnmerlino in forum Excel General
    Replies: 6
    Last Post: 12-01-2010, 01:20 AM
  4. IF Formula not giving expected results.
    By fungus in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-17-2010, 02:10 PM
  5. Formula results giving 29/01/1990?
    By Finalfrontier1976 in forum Excel General
    Replies: 2
    Last Post: 03-24-2010, 03:46 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