+ Reply to Thread
Results 1 to 6 of 6

SUMPRODUCT IF(OR) type of thing

  1. #1
    Registered User
    Join Date
    03-10-2014
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    70

    SUMPRODUCT IF(OR) type of thing

    Hello, I need to sum the product of 2 columns, if their value in another column meets a certain criteria.

    Col A...........Colum B.........Col C
    Apples..........5..................12
    Bananas.......6...................44
    Cherries........10..................33
    Apples..........5.......................7
    Apples.........4......................36
    Bananas.........6.....................3
    Cherries.........3.....................0

    I would like to sumproduct Colum B * Col C if Col A = "Apples" or "Cherries"


    =SUMPRODUCT(--(A1:A100=OR("Apples", "Cherries"),B1:B100,C1:C100) does not seem to work.
    Last edited by HalPlz; 08-14-2016 at 08:21 PM.

  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: SUMPRODUCT IF(OR) type of thing

    Try it like this...

    =SUMPRODUCT(--ISNUMBER(MATCH(A1:A100,{"Apples","Cherries"},0)),B1:B100,C1:C100)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: SUMPRODUCT IF(OR) type of thing

    Try this
    Cells F1 and G1 hold "Apples" and "Cherries" respectively with formula entered in F2
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v A B C D E F G
    1 Apples 5 12 Apples Cherries
    2 Bananas 6 44 115
    3 Cherries 10 33
    4 Apples 5 7
    5 Apples 4 36
    6 Bananas 6 3
    7 Cherries 3 0
    Or this
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Not quite sure which options OP want.
    Last edited by AlKey; 08-14-2016 at 07:36 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,913

    Re: SUMPRODUCT IF(OR) type of thing

    Or try this ...

    =SUMPRODUCT((A1:A100="Apples")+(A1:A100= "Cherries"),B1:B100,C1:C100)

  5. #5
    Registered User
    Join Date
    03-10-2014
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    70

    Re: SUMPRODUCT IF(OR) type of thing

    Thanks everyone

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

    Re: SUMPRODUCT IF(OR) type of thing

    You're welcome!

+ 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. [SOLVED] Trying to make a database type thing
    By Knightz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-04-2016, 11:17 AM
  2. "Sort by" type of thing
    By joh123 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-06-2014, 05:02 PM
  3. [SOLVED] If cell contains text do one thing, if it contains number do another thing
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-16-2013, 11:50 AM
  4. Help with SUMPRODUCT IF type of function
    By JVAllStar in forum Excel General
    Replies: 3
    Last Post: 06-21-2012, 03:01 PM
  5. Excel calendar search macro - type thing
    By ksatoday in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2011, 06:26 AM
  6. Replies: 5
    Last Post: 02-25-2010, 12:43 PM
  7. [SOLVED] How do I get one cell to type the same thing as another cell?
    By Astrowalker in forum Excel General
    Replies: 4
    Last Post: 08-01-2005, 03:05 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