=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?
Bookmarks