+ Reply to Thread
Results 1 to 4 of 4

Sum values with different criteria

  1. #1
    Registered User
    Join Date
    04-08-2013
    Location
    Wajdušna
    MS-Off Ver
    Office 365
    Posts
    79

    Sum values with different criteria

    Hello,

    Good people from excel forum i would have a question hot to simplify an equation im currently using.
    Here is the situation:
    We have 3 sheets
    1. lets assume i have a data base in sheet 1 and there in column A i have code values (400, 300, 678, 402,...) which correspond to a certain value i want to extract in column B
    2. lets assume i have this criteria range in sheet 2, as you can see below. For number 1 corresponding code values are 400, 300 and 678
    A B C D
    1 400 300 678
    2 402 403 404
    3 406 5 6
    4 407 1 2
    3. in sheet 3 i want to extract values for number 1 from sheet 1 in column B, those are the values that have a code value in column A 400, 300 and 678 and i want to sum them. Is there any easier way to do that. I came up with this solution which is ok if u have small number of code values (3) but if u have 10 or more its imposibruuu.
    for number 1:
    +index(sheet1!B:B;Match(sheet2!B1;sheet1!A:A;0)
    +index(sheet1!B:B;Match(sheet2!C1;sheet1!A:A;0)
    +index(sheet1!B:B;Match(sheet2!D1;sheet1!A:A;0)
    is there any chance to make some sort of an array that would in one equation sum all the values that correspond the codes for number 1?

    I hope my question can be understood if not i can send workbook and explain it more in detail.

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Sum values with different criteria

    It would be better to have a sample book
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,194

    Re: Sum values with different criteria

    Try

    =SUMPRODUCT((Sheet1!$B$1:$B$1000)*((Sheet1!$A$1:$A$1000=Sheet2!$B1:$F1)))

    B1:F1 contains your codes
    Last edited by JohnTopley; 01-30-2016 at 11:09 AM.

  4. #4
    Registered User
    Join Date
    04-08-2013
    Location
    Wajdušna
    MS-Off Ver
    Office 365
    Posts
    79

    Re: Sum values with different criteria

    I think it works like a charm, i will do some more tests but so far it looks promising )

+ 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. how to add all values above row that meet multiple criteria criteria
    By skikio in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-18-2015, 09:40 AM
  2. Replies: 1
    Last Post: 10-01-2014, 04:50 PM
  3. Replies: 4
    Last Post: 04-05-2014, 04:36 PM
  4. Index Match using two criteria to return on of criteria values
    By RogueLeader in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-17-2014, 09:50 AM
  5. [SOLVED] How to sum values based on multiple criteria with multple possibilities for each criteria?
    By boredaxel in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-05-2013, 02:26 AM
  6. Replies: 2
    Last Post: 10-05-2011, 12:43 PM
  7. Summing up values that match criteria.:particular criteria.
    By rmacttu in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-03-2009, 04:21 AM

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