illusionek
Board Regular
- Joined
- Jun 21, 2014
- Messages
- 104
Hello
I got a challenge that requires SumIfs on steroids I need to be able to sum multiple columns applying two criteria on rows and one on column. The data set will be dynamic (both rows & columns) and I am unable to add helper columns. Ideally I would like to avoid array formulas due to concerns about performance but if I have no choice then beggars cant be choosers
I think VBA user-defined function would be ideal solutions but I struggle to come up with the correct code as my VBA skills are very limited.
First table provides example of data structure and the bottom two criteria applied and expected result.
I got a challenge that requires SumIfs on steroids I need to be able to sum multiple columns applying two criteria on rows and one on column. The data set will be dynamic (both rows & columns) and I am unable to add helper columns. Ideally I would like to avoid array formulas due to concerns about performance but if I have no choice then beggars cant be choosers
I think VBA user-defined function would be ideal solutions but I struggle to come up with the correct code as my VBA skills are very limited.
First table provides example of data structure and the bottom two criteria applied and expected result.
Item | Region | Jan | Feb | Mar |
Grapes | North | 100 | 200 | 250 |
Grapes | South | 50 | 2 | 54 |
Apples | North | 454 | 54 | 4 |
Apples | South | 454 | 44 | 44 |
Grapes | South | 44 | 5 | 555 |
Apples | North | 4 | 5 | 2 |
Item | Grapes |
Region | South |
Month | Feb |
Expected Result | 7 |
Item | Apples |
Region | North |
Month | Mar |
Expected Result | 6 |