+ Reply to Thread
Results 1 to 2 of 2

Multiple variables, responses and results?

  1. #1
    Registered User
    Join Date
    06-24-2011
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    1

    Post Multiple variables, responses and results?

    I am trying to return financial data (which is seperated by month), on a YTD basis (but also based on other variables within the database).

    My formula is as follows:
    =SUM(IF('BI P&L Download Mth by Mth'!$D$30:$D$65536=CONCATENATE('Set Up'!$B$4," ","YTD"),IF('BI P&L Download Mth by Mth'!$E$30:$E$65536='Set Up'!$B$1,IF(AND('BI P&L Download Mth by Mth'!$G$30:$G$65536='Set Up'!$B$2,'BI P&L Download Mth by Mth'!$G$30:$G$65536='Set Up'!$B$6),IF('BI P&L Download Mth by Mth'!$C$30:$C$65536=$A8,'BI P&L Download Mth by Mth'!$I$30:$I$65536,0),0))))*1000

    The portion in red is the problem, where I want it too read 2 different months and return the result for both months from the database.

    For simplification, I will use a easier example, which will help. (This from exceldigest.com)

    In the example below we want to sum up the total sales for “John” in quarter 2 (Q2). i.e. our criteria is “John” in column B and “Q2″ in column C. We will use the following formula for this purpose:

    {=SUM(IF($B$2:$B$17=”John”,IF($C$2:$C$17=”Q2″,$D$2:$D$17,0),0))}

    This formula will give us a result of 9547 (summing sales in the yellow rows).
    EXCEL.gif

    Now however I want to be able sum Johns data for Q1 AND Q2.

    Please can someone help?

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Multiple variables, responses and results?

    =SUMPRODUCT(--(B2:B217="john"),--(C2:C17="q1")+(C12:C17="q2"),(d2:D17))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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