+ Reply to Thread
Results 1 to 11 of 11

Sumif or index formula?

  1. #1
    Registered User
    Join Date
    02-02-2018
    Location
    Greece
    MS-Off Ver
    2013
    Posts
    43

    Sumif or index formula?

    Hello guys,

    I have an issue.

    In the attached excel sheet, I want to create in cell B10 a formula, which will go through column A, and in case it finds any cell throughout column A that contains "1350", will return the sum of the values found in column J as per the attached excel sheet. In this case, B10 should return $327,181.92

    Ideally, I would try index match formula but for some reason it doesn't seem to be working; apparently been trying something wrong

    Any ideas on that?
    Attached Files Attached Files

  2. #2
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Sumif or index formula?

    A very basic SUMIF with a wildcard (*):

    =SUMIF($A$2:$A$7,"1350*",J2:J7)

    You may need semi-colons for your locale:

    =SUMIF($A$2:$A$7;"1350*";J2:J7)
    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.

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

    Re: Sumif or index formula?

    Search "1350xx"

    =SUMIF($A$2:$A$7,1350&"*",$J$2:$J$7)

    or "xx1350xx"

    =SUMIF($A$2:$A$7,"*"&1350&"*",$J$2:$J$7)
    Quang PT

  4. #4
    Registered User
    Join Date
    02-02-2018
    Location
    Greece
    MS-Off Ver
    2013
    Posts
    43

    Re: Sumif or index formula?

    Perfect, thank you both. Sumif works just fine.

    I was trying -apparently incorrectly- to use an index match formula.

    =index(J2:J7;match("1350";$A2$:$A7$;0))

    That would return one single value in case it would trace "1350" throughout column A, but I was trying to return the sum of values based on search "1350"

  5. #5
    Registered User
    Join Date
    02-02-2018
    Location
    Greece
    MS-Off Ver
    2013
    Posts
    43

    Re: Sumif or index formula?

    In other words, could the above be somehow set as a combination of index match formula with a sum?

    For example, should it find look up value "1350" from column A, to return the sum of all the respective amounts matched with "1350" in column J

  6. #6
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,780

    Re: Sumif or index formula?

    1350 is not in column J - please provide a more realistic sample of data. You will probably need SUMPRODUCT.

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

    Re: Sumif or index formula?

    Quote Originally Posted by DimitrisPap View Post
    In other words, could the above be somehow set as a combination of index match formula with a sum?
    INDEX(MATCH returns single value that first match, not all.

  8. #8
    Registered User
    Join Date
    02-02-2018
    Location
    Greece
    MS-Off Ver
    2013
    Posts
    43

    Re: Sumif or index formula?

    Alright, will try to make clear what I want.

    In cell let's say M2, I want a formula that runs through column A, traces "1350" and returns the sum of the values found in column K (in that case $223,445.93)

    I was having a hard time on that because I was trying to combine sum and index match formula.

    And one more thing I want to make, is to combine two criteria and return again the sum values. For example a formula that runs through column A, traces "1350" and "1300" and returns the sum of values found in column K ( in that case 260,037.93)

    I guess concatenate would somehow help here?

    Sorry for the hassle!
    Attached Files Attached Files

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

    Re: Sumif or index formula?

    Using 2 SUMIF to combine :

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    02-02-2018
    Location
    Greece
    MS-Off Ver
    2013
    Posts
    43

    Re: Sumif or index formula?

    Quote Originally Posted by AliGW View Post
    1350 is not in column J - please provide a more realistic sample of data. You will probably need SUMPRODUCT.
    Even tho Bebo's reply covered me completely, there is also a way to do so using sumproduct??

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

    Re: Sumif or index formula?

    SUMPRODUCT is alternative, in case SUMIF does not work, but if SUMIF does, it is a best choice.

+ 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. Need Help in SumIF & Index Formula
    By ishak in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-20-2019, 07:41 AM
  2. [SOLVED] Index Match Sumif formula
    By Neilesh Kumar in forum Excel General
    Replies: 5
    Last Post: 10-17-2019, 12:52 PM
  3. Sumif with Index Match Formula
    By khadyal in forum Office 365
    Replies: 1
    Last Post: 09-18-2015, 02:43 AM
  4. [SOLVED] using INDEX and MACTH in a SUMIF formula
    By moneypennie21 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 12-18-2014, 12:16 PM
  5. [SOLVED] SumIf & Index formula
    By pbt in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-10-2014, 11:48 AM
  6. sumif or index formula help
    By ben803 in forum Excel General
    Replies: 8
    Last Post: 10-14-2011, 07:09 PM
  7. Explain index sumif formula
    By shopgirl1977 in forum Excel General
    Replies: 9
    Last Post: 12-17-2009, 12:14 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