Long Nose
Board Regular
- Joined
- Nov 19, 2007
- Messages
- 67
- Office Version
- 365
- Platform
- Windows
Is there a way I can shorten this formula.
Works - This adds "US", "VI", "PR", and excludes "CA"
SUMPRODUCT(SUMIFS(INDIRECT("'"&TACO_LIST&"'!$d:$d"),INDIRECT("'"&TACO_LIST&"'!$b:$b"),"US",INDIRECT("'"&TACO_LIST&"'!$c:$c"),$B4))+SUMPRODUCT(SUMIFS(INDIRECT("'"&TACO_LIST&"'!$d:$d"),INDIRECT("'"&TACO_LIST&"'!$b:$b"),"VI",INDIRECT("'"&TACO_LIST&"'!$c:$c"),$B4))+SUMPRODUCT(SUMIFS(INDIRECT("'"&TACO_LIST&"'!$d:$d"),INDIRECT("'"&TACO_LIST&"'!$b:$b"),"PR",INDIRECT("'"&TACO_LIST&"'!$c:$c"),$B4))
Also works - One option was add all and subtract "CA"
=SUMPRODUCT(SUMIFS(INDIRECT("'"&TACO_LIST&"'!$d:$d"),INDIRECT("'"&TACO_LIST&"'!$c:$c"),$B4))-SUMPRODUCT(SUMIFS(INDIRECT("'"&TACO_LIST&"'!$d:$d"),INDIRECT("'"&TACO_LIST&"'!$b:$b"),"CA",INDIRECT("'"&TACO_LIST&"'!$c:$c"),$B4))
Doesn't work - What I wanted to do is create a named range CNTY = ("US", "VI", "PR") and use that only. Like this, but it doesn't work.
SUMPRODUCT(SUMIFS(INDIRECT("'"&TACO_LIST&"'!$d:$d"),INDIRECT("'"&TACO_LIST&"'!$b:$b"),CNTY,INDIRECT("'"&TACO_LIST&"'!$c:$c"),$B4))
Is there a trick I can get CNTY range to work?
Works - This adds "US", "VI", "PR", and excludes "CA"
SUMPRODUCT(SUMIFS(INDIRECT("'"&TACO_LIST&"'!$d:$d"),INDIRECT("'"&TACO_LIST&"'!$b:$b"),"US",INDIRECT("'"&TACO_LIST&"'!$c:$c"),$B4))+SUMPRODUCT(SUMIFS(INDIRECT("'"&TACO_LIST&"'!$d:$d"),INDIRECT("'"&TACO_LIST&"'!$b:$b"),"VI",INDIRECT("'"&TACO_LIST&"'!$c:$c"),$B4))+SUMPRODUCT(SUMIFS(INDIRECT("'"&TACO_LIST&"'!$d:$d"),INDIRECT("'"&TACO_LIST&"'!$b:$b"),"PR",INDIRECT("'"&TACO_LIST&"'!$c:$c"),$B4))
Also works - One option was add all and subtract "CA"
=SUMPRODUCT(SUMIFS(INDIRECT("'"&TACO_LIST&"'!$d:$d"),INDIRECT("'"&TACO_LIST&"'!$c:$c"),$B4))-SUMPRODUCT(SUMIFS(INDIRECT("'"&TACO_LIST&"'!$d:$d"),INDIRECT("'"&TACO_LIST&"'!$b:$b"),"CA",INDIRECT("'"&TACO_LIST&"'!$c:$c"),$B4))
Doesn't work - What I wanted to do is create a named range CNTY = ("US", "VI", "PR") and use that only. Like this, but it doesn't work.
SUMPRODUCT(SUMIFS(INDIRECT("'"&TACO_LIST&"'!$d:$d"),INDIRECT("'"&TACO_LIST&"'!$b:$b"),CNTY,INDIRECT("'"&TACO_LIST&"'!$c:$c"),$B4))
Is there a trick I can get CNTY range to work?