Hi all,
I'm creating a report that uses pulldowns to let people select various groupings of products.
So e.g. it will have a pull down for state listing out all of our states, but then will also include groupings of states,
"west region"
"east region"
"all"
I would like to create a sumifs formula that in psuedocode looks like:
Where "regiongrouping" is whatever is needed to accomplish the grouping they've selected in the pulldown.
I tried creating the region grouping pulldown for them using data validation and pointing to a list of values. Then using a vlookup to pass values to sumif that accomplish what I want:
Where regionlookdecode is a table that looks like this:
State, DecodeValue
MN , MN,
ND, ND,
...
west region, ???
east region, ???
All, *
I can't figure out what to put in the table for the ??? to make it give me the groupings I want. Say west region was all states except ND and MN. It seems like I need to use some kind of AND and OR formulas but I can't get it going and can't find much documentation on the criteria syntax that helps.
Is there a way to do this with sumifs and vlookup? I'd rather not delve into array formulas if I can avoid it.
Thanks!
Dave
I'm creating a report that uses pulldowns to let people select various groupings of products.
So e.g. it will have a pull down for state listing out all of our states, but then will also include groupings of states,
"west region"
"east region"
"all"
I would like to create a sumifs formula that in psuedocode looks like:
Code:
=sumifs(productdata[revenue],productdata[state],regiongrouping)
Where "regiongrouping" is whatever is needed to accomplish the grouping they've selected in the pulldown.
I tried creating the region grouping pulldown for them using data validation and pointing to a list of values. Then using a vlookup to pass values to sumif that accomplish what I want:
Code:
=sumifs(productdata[revenue],productdata[state],vlookup(SelectedRegionGrouping,regionlookdecode,2,false))
Where regionlookdecode is a table that looks like this:
State, DecodeValue
MN , MN,
ND, ND,
...
west region, ???
east region, ???
All, *
I can't figure out what to put in the table for the ??? to make it give me the groupings I want. Say west region was all states except ND and MN. It seems like I need to use some kind of AND and OR formulas but I can't get it going and can't find much documentation on the criteria syntax that helps.
Is there a way to do this with sumifs and vlookup? I'd rather not delve into array formulas if I can avoid it.
Thanks!
Dave