+ Reply to Thread
Results 1 to 4 of 4

Sum if Conditions embedded in a INDEX MATCH function

  1. #1
    Registered User
    Join Date
    07-23-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Sum if Conditions embedded in a INDEX MATCH function

    =IFERROR(SUM(OFFSET(INDEX('2013'!$R$3:$BR$44,MATCH('Sean MacDonald'!C49,'2013'!$C$3:$C$44,0),MATCH('Sean MacDonald'!$D$2,'2013'!$R$2:$BR$2,0)),0,-12):INDEX('2013'!$R$3:$BR$44,MATCH('Sean MacDonald'!C49,'2013'!$C$3:$C$44,0),MATCH('Sean MacDonald'!$D$2,'2013'!$R$2:$BR$2,0))),0)

    This Add’s current Lookup 'Sean MacDonald'!$D$2, Matched with 'Sean MacDonald'!C49 to the 12 prior cells.
    13 Weeks running.

    I need to embed multiple if conditions for weeks that fall in a particular period—some periods have 4 weeks, some 5 weeks(add the lookup value 'Sean MacDonald'!$D$2, Matched with 'Sean MacDonald'!C49 along with the cells that fall under the specified “IF” criteria [particular period]).

    Example, If i input 3 for 'Sean MacDonald'!$D$2, it will use the index match function and Add 4 cells that fall under the columns with values 1, 2, 3, 4 for period 1.

    If Conditions—
    If('Sean MacDonald'!$D$2={“1”,”2”,”3”,”4”},cell lookup range,0)
    IF('Sean MacDonald'!$D$2={“5”,”6”,”7”,”8”},cell lookup range,0)
    IF('Sean MacDonald'!$D$2={“9”,”10”,”11”,”12”,”13”},cell lookup range,0)
    --So on and so forth until I get all my periods for 52 weeks specified.

    These would be first 3 periods; thoughts on potential lookup statement…
    =IFERROR(SUM(If(INDEX('2013'!$R$3:$BR$44,MATCH('Sean MacDonald'!C49,'2013'!$C$3:$C$44,0),MATCH('Sean MacDonald'!$D$2,'2013'!$R$2:$BR$2,0)),'Sean MacDonald'!$D$2={“1”,”2”,”3”,”4”},cell lookup range,0),'Sean MacDonald'!$D$2={“5”,”6”,”7”,”8”},cell lookup range,0),'Sean MacDonald'!$D$2={“9”,”10”,”11”,”12”,”13”},cell lookup range,0)),0) +rest of conditions.

    Wondering if there is an easier way to do this or if my structure is off?

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Sum if Conditions embedded in a INDEX MATCH function

    Can you upload example workbook?
    Make sure to remove private informations.

  3. #3
    Registered User
    Join Date
    07-23-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Sum if Conditions embedded in a INDEX MATCH function

    Can't release the Sheet.

    What about if I just provide you with the start of the forumula

    =IFERROR(SUMif(INDEX('2013'!$R$3:$BR$44,MATCH('Sean MacDonald'!C92,'2013'!$C$3:$C$44,0),MATCH('Sean MacDonald'!$D$2,'2013'!$R$2:$BR$2,0))

    And ask the appropriate way to include my sumif conditions?

    range,'Sean MacDonald'!$D$2={"value","value"},range
    followed by 12 more conditions of the same above.

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Sum if Conditions embedded in a INDEX MATCH function

    Without an example sheet and expected results for some given criteria, you're giving us a close to impossible task.

    Please upload a sample showing source data, criteria and expected results, use fictional data in place of anything confidential, but please ensure that it gives an accurate representation and that values do tally correctly.

+ 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