Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Excel Issue ( Complex sum )

  • 08-03-2013 10:36PM
    #1
    Registered Users, Registered Users 2 Posts: 3


    Hi

    Appreciate some help out there if anyone can oblige

    I have the below worksheet with data that I need to manipulate to go into another sheet


    AREA 1 SYSTEM 1 CORE EVENING WEEKEND
    N Y 7 0 0
    Y N 15 0 0
    Y Y 51 0 0
    Y Y 45 0 0


    I want to get a sum of the core figures if AREA 1 and SYSTEM 1 are both "Y"
    I have got a count of the event using the following formula

    =SUMPRODUCT(--(data!A2:A5="Y"),--(data!B2:B5="Y"))

    Core Evening Weekend
    Area 1 2
    SYSTEM 1 2


    So what I would be expecting is that core would have a total of 96 and so on and on

    Any thoughts ???


Comments

  • Registered Users, Registered Users 2 Posts: 419 ✭✭Mort5000


    Option 1:
    Use 1 and 0 as your Y and No indicators and then just multiply all the columns, area x system x core

    Option 2:
    Use nested IF functions to conditionally get your values.
    =IF(B15="y",IF(C15="y",D15,0),0)


  • Registered Users, Registered Users 2 Posts: 450 ✭✭SalteeDog


    You can use the SUMIFS function - which is specifically for this purpose.

    i.e =SUMIFS(C2:C5,A2:A5,"Y",B2:B5,"Y") will do what you need.


    SUMIFS, SUMIF and indeed COUNTIF are very handy functions.


  • Registered Users, Registered Users 2 Posts: 3 thecroghanlad


    Thanks folks - I was over complicating things - both solutions are exactly what I needed - Regards


Advertisement