+ Reply to Thread
Results 1 to 6 of 6

sumproduct, 2 variables in 2 columns, is it possible?

  1. #1
    Registered User
    Join Date
    02-11-2009
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    39

    sumproduct, 2 variables in 2 columns, is it possible?

    I've attached a sample with a description of what I'm trying to accomplish.

    I need to find data in 2 columns with the same heading that meet certain criteria in the row, and of course sum the total.

    Please look at attachment and I think that will be more easily understood.

    Thanks/
    Last edited by Bucco63; 03-08-2010 at 08:42 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    08-23-2009
    Location
    Hampshire, UK
    MS-Off Ver
    Excel 2003, Excel 2007
    Posts
    328

    Re: sumproduct, 2 variables in 2 columns, is it possible?

    You can use Sumproduct in your example

    =SUMPRODUCT(($B$2:$L$2=C15)*($A$4:$A$11="XY")*($B$4:$L$11))

  3. #3
    Registered User
    Join Date
    02-11-2009
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: sumproduct, 2 variables in 2 columns, is it possible?

    Sweet! Thank you!

  4. #4
    Registered User
    Join Date
    02-11-2009
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: sumproduct, 2 variables in 2 columns, is it possible?

    Now what if I want to instead of being equal to FY10-6 or whatver, instead want it to add if row 2 "contains" FY10?

    Is that possible?

  5. #5
    Registered User
    Join Date
    03-08-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: sumproduct, 2 variables in 2 columns, is it possible?

    there probably is ways of doing this in a single large formula but easiest way around it
    is just to add an extra row to show just the FY then amend the sumproduct formula given.

    See attached.

    Cheers

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: sumproduct, 2 variables in 2 columns, is it possible?

    You can check if the cells contain the string like this (with "FY10" in D15)

    =SUMPRODUCT((NOT(ISNA(FIND(D15,$B$2:$L$2))))*($A$4:$A$11="XY")*($B$4:$L$11))

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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