SUMIFS and non-volatile alternative to INDIRECT

carteBlanche

New Member
Joined
Oct 7, 2014
Messages
19
Hi everybody,

I have a workbook with a data set and a relatively large report. The raw data are pulled from some ERP software and stored in a table in a worksheet. Then, I use a combination of SUMIFS and INDIRECT functions to organise the data in a report in another worksheet.

Basically, INDIRECT is used within SUMIFS (as its first argument) to refer to the desired column of the raw data table. The columns of the table with the raw data as well as their order change more often than not each time I output the data from the ERP. I like the flexibility offered by INDIRECT for that reason.

I've used this method with smaller reports but I knew I'd have to find a non-volatile alternative to INDIRECT for larger reports. So here I am, my workbook is painfully slow and I am stuck after hours of search on the internet.

I've read about alternatives using CHOOSE/MATCH or named ranges but never managed to make something of it without using INDIRECT at some point.

I've used INDIRECT for way too long and probably can't open my mind to something different or another approach to this, so any pointers would be much appreciated :)

Please note that:
- I do not use pivot tables on purpose because of the data structure in the ERP software;
- I did not explore VBA-oriented options on purpose as well because the workbook is used by many people;
- I'd like to avoid having to set calculations to manual;
- I could re-organise the structure of the output data in the ERP (and have a single column with amounts, thus eliminating the need to refer to the desired column) but that would result in a table with way too many rows.

Thanks,

Tom.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
so show us what the raw data looks like AND what it looks like in the table in the worksheet (anonymise if necessary)
 
Upvote 0
What's your current formula?
 
Upvote 0
The current formula in the report would be ("tblDATA" being the name of the table):

Code:
=SUMIFS(INDIRECT("tblDATA["&D$3&"]");tblDATA[VAR A];$C10;
tblDATA[VAR B];D$2;
tblDATA[VAR C];D$3;
tblDATA[VAR D];D$4)
 
Upvote 0
do u want, say, for item 1 , 2015, quantity, the 4 numbers in the scenario columns..........
 
Upvote 0
quantity
scascbsccscd
item12015annual9
item12015annualquantity3456
item12015annualnetsales4567
item12015annualprodmar5678formula for 9 is
item12015annualquantity6789
item12015annualnetsales78910=SUMPRODUCT(($A$31:$A$43=$L29)*($B$31:$B$43=M29)*($C$31:$C$43=N29)*($D$31:$D$43=$M$27)*($E$31:$E$43))
item12015annualprodmar891011
item12014annualquantity9101112
item12014annualnetsales10111213
item12014annualprodmar11121314
item12014annualquantity12131415
item12014annualnetsales13141516
item12014annualprodmar14151617
item12014annualquantity15161718

<colgroup><col width="64" span="21" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
The current formula in the report would be ("tblDATA" being the name of the table):

Code:
=SUMIFS(INDIRECT("tblDATA["&D$3&"]");tblDATA[VAR A];$C10;
tblDATA[VAR B];D$2;
tblDATA[VAR C];D$3;
tblDATA[VAR D];D$4)

Try to replace INDIRECT with INDEX and you are good to go. If you don't how, try to post your exhibit in an Excel readable form.
 
Upvote 0
It will be:

=SUMIFS(INDEX(tblData;0;MATCH($D$3;tblData[#Headers];0));tblDATA[VAR A];$C10;
tblDATA[VAR B];D$2;
tblDATA[VAR C];D$3;
tblDATA[VAR D];D$4)
 
Upvote 0

Forum statistics

Threads
1,215,415
Messages
6,124,764
Members
449,187
Latest member
hermansoa

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top