I am trying to use the VLOOKUP function with a sumif function.
I have a drop down box that has a list of names, combined with a list of combinations.
Salesman1 Salesman2 Salesman3 Salesman4 Salesman5 Salesman6 RegionA RegionB
and a side table that has a list of salesmen and regoins:
RegionA Salesman1 RegionB Salesman2 RegionB Salesman3 RegionB Salesman4 RegionA Salesman5 RegionB Salesman6
(This list can be swapped if needed)
I would like to sum up the totals of Salesmen in the regions. I can sumif using the individual salesmen
but I’d like to see a sumif on region. The data comes from somewhere else, and is variable in length, so a helper column would be difficult to create
I was thinking of something along the lines of vlookup, but I can’t get it to work
clarification: The dropdown contains both salesmen and regions, and I wish to be able to sum both ways (formula split for clarity)
IF(UPPER(LEFT($B$3,3))="REG", SUMIFS(Sheet1!$H:$H,Sheet1!$J:$J,RegionTest,Sheet1!$G:$G,TEXT($E18,"yyyy-mm")), SUMIFS(Sheet1!$H:$H,Sheet1!$J:$J,$B$3,Sheet1!$G:$G,TEXT($E18,"yyyy-mm")))
You can use an array formula like this for “RegionA”:
confirmed with CTRL+SHIFT+ENTER
where Regions and Salesmen represent the two columns of your table
With your stipulation to use either Salesman or Region try like this
still using CTRL+SHIFT+ENTER