+ Reply to Thread
Results 1 to 9 of 9

Trying to perfect SUMIF Formula

  1. #1
    Registered User
    Join Date
    10-01-2014
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    4

    Trying to perfect SUMIF Formula

    I am trying to finalize a SUMIF formula that just appears to need some tweaking. Here is a sample of what I am attempting:

    ExcelSnip.PNG

    I am asking the formula to add numbers in column B when the values in column A are the same. The formula seems to be working "once" (e.g. C1 = B1 and B2) but then puts in another value (C2) that I do not want.

    Is there a solution to this dilemma?

    Thank you.

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Trying to perfect SUMIF Formula

    Hi


    I think you could adjust references as in (A1 and B1 free)

    =SUMIF(A1:A$100,A1,B1:B$100)


    Hope it helps
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Trying to perfect SUMIF Formula

    John, welcome to the forum

    1st, Please upload a sample of your workbook, not a picture of your data. Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you
    Also, not all members can upload picture files (Company firewalls and stuff)

    Your workbook should show a small desensitized example of the data you are working with and a manual mockup of the expected results.

    Having said that, if you want a cummulative total as you copy down, try something like....
    =SUMIF(A$1:A1,A1,B$1:B1)

    If you want the total shown for every match, change that to this...
    =SUMIF(A$1:A$100,A1,B$1:B$100)
    Last edited by FDibbins; 10-01-2014 at 11:40 AM.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Trying to perfect SUMIF Formula

    Hi mrsgloria and welcome to the forum.

    Please not that forum rules require you to start your own thread, bit post on another member's thread
    And, we have a forum for saying "Hi" and introducing yourself

  5. #5
    Registered User
    Join Date
    10-01-2014
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Trying to perfect SUMIF Formula

    Thank you but I am not seeing an option for uploading a file.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Trying to perfect SUMIF Formula

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

  7. #7
    Registered User
    Join Date
    10-01-2014
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Trying to perfect SUMIF Formula


  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Trying to perfect SUMIF Formula

    Thanks

    Based on your sample, try this, copied down...
    =IF(COUNTIF($A$1:A1,A1)>1,"",SUMIF($A$1:$A$6,A1,$B$1:$B$6))

  9. #9
    Registered User
    Join Date
    10-01-2014
    Location
    Michigan
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Trying to perfect SUMIF Formula

    Thanks, FD. I could get your formula to work for a couple of cells then it started totaling zero. I am trying something else with subtotals and I will see if that works and
    report here.

+ 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. Formula to calculate how many more perfect surveys to hit the goal.
    By carlodejesus in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-28-2017, 12:12 PM
  2. Formula for number of perfect ordered needed to achieve certain target.
    By kokoli84 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-11-2014, 08:06 PM
  3. [SOLVED] SUMIF perfect in past , now has issue
    By makinmomb in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-07-2014, 03:07 PM
  4. looking for my perfect algorithm
    By meesh7391 in forum Excel General
    Replies: 0
    Last Post: 01-10-2006, 08:06 PM
  5. [SOLVED] The Perfect Mix
    By Ronald Cayne in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-12-2005, 02:06 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