We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

Excel SUMPRODUCT help please :)

Options
_Andy_
_Andy_ Posts: 11,150 Forumite
Good morning people

I have an Excel spreadsheet which I'm adding a simple dashboard/summary sheet to.
To do so I need to calculate (amongst other things) the number of people taking part in a programme that are from a particular region.
The data is imported from Access and is TRUE/FALSE data.

I need to reference different columns to 'say'

How many 'RegionX' people (a true/false column) are still in the programme (another true/false column). (i.e. give me the total number of people that match both criteria)

I'm pretty sure SUMPRODUCT would do this but I have minimal experience of using the function.
Tried playing around with nested IFs etc but got befuddled.

Any help is appreciated
Cheers :)

Comments

  • PhilCo_2
    PhilCo_2 Posts: 136 Forumite
    In below A:A is the region column, =region is what to find. B:B is True/False column. Depending on how field is set you might need to put "" around it.

    =SUMPRODUCT((A:A=region)*(B:B=TRUE))
  • LeifGR
    LeifGR Posts: 188 Forumite
    Which version of Excel are you using?

    If you have the function COUNTIFS (I do in Excel 2007), then you can do as follows:

    Assuming your data is in rows 2 through 4, that you have three regions in columns A through C and that the "in/out" column is D, your formula would be

    =COUNTIFS(A2: A4,TRUE,$D2:$D4,TRUE) (remove the space after A2:, it was turning into a smilie and I don't know how to get around that)
  • PhilCo_2
    PhilCo_2 Posts: 136 Forumite
    If there are 2 True/False columns just add another criteria:

    =SUMPRODUCT((A:A=region)*(B:B=TRUE)*(C:C=TRUE))
  • _Andy_
    _Andy_ Posts: 11,150 Forumite
    Thanks guys, I'll have a play this afternoon.
    Forgot to say, it's 03 so can't use COUNTIFS.
    Cheers :)
  • LeifGR
    LeifGR Posts: 188 Forumite
    edited 24 June 2010 at 12:54PM
    If you don't have COUNTIFS, then you could use what is called an array formula. To enter this, you need to type the formula and then press CTRL+SHIFT+ENTER.

    With the same assumptions as in my previous post, your formula would be:

    =SUM(A2: A4*$D2:$D4) (without the space)

    BUT after you have typed that and pressed CTRL+SHIFT+ENTER to commit it into the sheet, it will look like this:

    {=SUM(A2: A4*$D2:$D4)}

    An example here: http://www.megaupload.com/?d=G2JGS3QQ

    This can then be copied across to all your other region column summary cells.
  • _Andy_
    _Andy_ Posts: 11,150 Forumite
    Must be doing something wrong, trying the SUMPRODUCT..

    If I enter

    =SUMPRODUCT(('Mentor raw data'!C:C=FALSE)*(Mentor raw data'!R:R=TRUE))

    I get 'the formula you've entered contains an error..''?

    Thanks again
  • _Andy_
    _Andy_ Posts: 11,150 Forumite
    =SUMPRODUCT(('Mentor raw data'!C:C="FALSE")*'Mentor raw data'!R:R="TRUE")

    is giving a #NUM! in the cell
  • _Andy_
    _Andy_ Posts: 11,150 Forumite
    Ah guessing I can't reference the whole column,

    =SUMPRODUCT(('Mentor raw data'!B1:B250=TRUE)*('Mentor raw data'!R1:R250=TRUE))

    Seems to work ok
  • PhilCo_2
    PhilCo_2 Posts: 136 Forumite
    Probably, 2007 lets you just reference the whole column.
  • _Andy_
    _Andy_ Posts: 11,150 Forumite
    Cool, working fine now. Thanks all for help, much appreciated.
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 350.9K Banking & Borrowing
  • 253.1K Reduce Debt & Boost Income
  • 453.5K Spending & Discounts
  • 243.9K Work, Benefits & Business
  • 598.7K Mortgages, Homes & Bills
  • 176.9K Life & Family
  • 257.1K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.