+ Reply to Thread
Results 1 to 11 of 11

How to SUM data using a "X" axis critieria and a "y" axis critieria

  1. #1
    Registered User
    Join Date
    04-02-2014
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2010
    Posts
    25

    How to SUM data using a "X" axis critieria and a "y" axis critieria

    I would like a formula that would look at something similar to the data below. searching and summing data based off 2 criteria...

    So I would have a criteria of "a" and "four" and would get a total of 23 (4+19=23)

    (sheet1)
    one two three four five
    a 1 2 3 4 5
    b 6 7 8 9 10
    c 11 12 13 14 15
    a 16 17 18 19 20
    b 21 22 23 24 25
    c 26 27 28 29 30

    (sheet2)

    sheet 2 looks something like this, but with the totals filled in the correct spots

    a b c
    one
    two
    three
    four
    five

    Please help!

  2. #2
    Valued Forum Contributor
    Join Date
    12-02-2012
    Location
    Melbourne, VIC
    MS-Off Ver
    Excel 2016
    Posts
    750

    Re: How to SUM data using a "X" axis critieria and a "y" axis critieria

    look at SUMIFS formula, where you can sum a range based on multiple criteria

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: How to SUM data using a "X" axis critieria and a "y" axis critieria

    See attachment.
    Attached Files Attached Files
    Quang PT

  4. #4
    Registered User
    Join Date
    04-02-2014
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: How to SUM data using a "X" axis critieria and a "y" axis critieria

    i have but i get a Value issue.

    i use something like

    =SUMIFS(F8:J13,E8:E13,"a",F7:J7,"four")

  5. #5
    Registered User
    Join Date
    04-02-2014
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: How to SUM data using a "X" axis critieria and a "y" axis critieria

    bebo! Thanks!!! that did it. i don't understand it but it did it!... why or what does the * do? doesn't this multiply?

  6. #6
    Registered User
    Join Date
    04-02-2014
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: How to SUM data using a "X" axis critieria and a "y" axis critieria

    Quote Originally Posted by bebo021999 View Post
    See attachment.
    can you explain that formula and the way you used it. its as if your multiplying the criteria in the formula but it works out accomplishing what i want.

  7. #7
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: How to SUM data using a "X" axis critieria and a "y" axis critieria

    Let try with simple sample:
    Please Login or Register  to view this content.
    Request: Sum the data range B2:C4, with columnA="a", row1="two"
    Aiming to sum the range
    Please Login or Register  to view this content.
    Do as following steps:

    1/ to make vertical range with 1st condition: columnA="a" =>
    A2:A4="a" looks like this {1;0;1} where TRUE(or FALSE) = 1(or 0)

    2/ to make horizoned range with 2st condition: row1="two" =>
    B1:C1="two" looks like this {0,1}

    3/ Multiply the two condition to make conditional range:
    (A2:A4="a")*(B1:C1="two") ={1;0;1}*{0,1}={0,1;0,0;0,1}
    Please Login or Register  to view this content.
    4/ Multiply with data range:
    (A2:A4="a")*(B1:C1="two")*B2:C4 = {0,1;0,0;0,1} * {1,2;3,4;5,6} = {0,2;0,0;0;6}
    Please Login or Register  to view this content.
    5/ Final SUM:
    =SUMPRODUCT((A2:A4="a")*(B1:C1="two")*B2:C4)
    =2+6=8

    Note: "," in horizoned range, ";" in vertical range

    Hope it is clear for you.

  8. #8
    Registered User
    Join Date
    04-02-2014
    Location
    North Carolina, USA
    MS-Off Ver
    Excel 2010
    Posts
    25

    Re: How to SUM data using a "X" axis critieria and a "y" axis critieria

    makes sense! thank you so much for explaining.

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How to SUM data using a "X" axis critieria and a "y" axis critieria

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  10. #10
    Registered User
    Join Date
    05-28-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1

    Re: How to SUM data using a "X" axis critieria and a "y" axis critieria

    This was super helpful, thank you!
    Last edited by a4b20c69; 05-28-2020 at 02:08 PM.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,426

    Re: How to SUM data using a "X" axis critieria and a "y" axis critieria

    See what? This is a 6-year-old thread.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them 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. Replies: 1
    Last Post: 03-08-2013, 05:20 AM
  2. Replies: 0
    Last Post: 07-08-2011, 02:25 PM
  3. Format Axis; Scale Tab; "Value Axis Crosses At" ends with preposit
    By Pedant in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-28-2005, 11:05 PM
  4. X-axis labels -- text "jan" "feb", comes out "1" "2" etc....
    By jeremy via OfficeKB.com in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-10-2005, 08:05 AM

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