+ Reply to Thread
Results 1 to 6 of 6

Help Calculating a sum with 2 conditions(!)

  1. #1
    Registered User
    Join Date
    01-24-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Help Calculating a sum with 2 conditions(!)

    Hey, so I am trying to create a formula to total a sum with 2 conditions. I believe this is the most effiicient formula for me however I will explain as well.


    Attachment 209386

    So the columns I am using are I ("Ticket Cost"), K ("Profit"), L ("Who Bought") and M ("Paid?").


    Currently I have added the totals up using SUMIF in cells P7:P10 according to whether or not they purchased the tickets.

    I have also added the profits up in cells R7:R10 using the SUMIF again.

    This is what I have input into R7 for example (=(SUMIF(L2:L500,"Adam",K2:K500) * P1) *0.2)

    The 0.2 is the percentage of the profit for that particular ticket which the person is allocated.



    That formula works perfectly for what I currently have however once the profit and money has been paid to that person, I do not have an additional formula (or one formula) to determine it.



    I thought I could just add to my current formula (-SUMIFS) and then add 2 conditions.


    However I seem to have gotten myself lost and I cannot figure out a formula to save my life..



    Currently cell R7 (=(SUMIF(L2:L500,"Adam",K2:K500) * P1) *0.2) should equal 0


    Concurrently, P7 (=SUMIF(L2:L500,"Adam",I2:I500)) should also equal 0





    Any ideas?

    I am completely flustered

  2. #2
    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
    52,945

    Re: Help Calculating a sum with 2 conditions(!)

    Hi tbailey and welcome to the forum

    next time, please upload a sample workbook, not a picture. Pictures are nice and pretty, but impossible to edit.

    based on the file name in your picture, it seems that you have 2007 or later, despite your profile saying 2003?

    I would suggest you try using the sumifS() function, instead of just sumif()

    If yoy still have a problem, perhaps it would be easier to help you if you uploaded a sample workbook, showing what data you are working with, a few examples of what your expected outcome would be, and how you would arrive at that (remove any confidential info if necessary).



    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.
    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

  3. #3
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Help Calculating a sum with 2 conditions(!)

    Could you upload a sample workbook, with some examples of what the data should be, and where it is not ?

    Add a File - click advanced (next to quick post), scroll down until you see "manage attachments", click that and select "add files" (top right corner). click "select files", find your file, select file, click "upload", when the file shows up at the bottom left click 'done"(bottom right). click "submit reply"(remember the 1 MB limit, you may have to crop your file down to get it to a size that can be uploaded...)
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  4. #4
    Registered User
    Join Date
    01-24-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Help Calculating a sum with 2 conditions(!)

    Well it seems I have uploaded the workbook, if I am not mistaken.


    Tab 3 is where I am referring everything to.


    And I am using Excel 2010
    Attached Files Attached Files
    Last edited by tbailey88; 01-25-2013 at 07:33 PM.

  5. #5
    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
    52,945

    Re: Help Calculating a sum with 2 conditions(!)

    Im not sure exactly what you want, but I think is the following formula doesnt give you what you need, it will at least show you a tool that you can modify to suite your needs...

    =SUMIFS($K$2:$K$18,$L$2:$L$18,Q7,$M$2:$M$18,"NO")

  6. #6
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Help Calculating a sum with 2 conditions(!)

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

    Drag down

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

    drag down

    I believe this gives the right results, but please double check

    Hope this helps

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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