+ Reply to Thread
Results 1 to 2 of 2

Sum if on multiple criteria

  1. #1
    Registered User
    Join Date
    01-22-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    1

    Sum if on multiple criteria

    Hi
    I'm trying to work out how to use a sum if on a table to sum up a column based on various criteria.

    My table kind of looks like this:

    YR1 YR2 YR3 YR4 YR5
    Country B 10 10 10 10 10
    Country A 10 10 10 10 10
    Country C 10 10 10 10 10
    Country D 10 10 10 10 10
    Country A 10 10 10 10 10
    Country C 10 10 10 10 10
    Country D 10 10 10 10 10


    This then feeds into a large table with changing years (dependent on what i want to select). I tried a sumif function and selected all the numbers as the sum range and then the Year as one criteria and country as another. This just returned a value. If i was looking at YR3, country A i would want to see 20 .

    Am i using the right function or is there something else that someone can recommend.
    Thanks for the help

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Sum if on multiple criteria

    Try this...

    With your table in the range A1:F8.

    Criteria:

    H2 = Country A
    I2 = YR3

    This formula entered in J2:

    =SUMIF(A2:A8,H2,INDEX(B2:F8,,MATCH(I2,B1:F1,0)))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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