Index-Indirect-Match Formula Only Pulls First Match

jeffst

New Member
Joined
May 21, 2018
Messages
8
I am trying to create a summary page that pulls data from different sheets that represent each year. It pulls the data based from cell S2 which is the fiscal year and uses indirect to pull from the corresponding tab name. It then looks up the sales location (B43) and matches with the title name of the corresponding sales total (S3). The formula works well, but for many of the locations, I have multiple rows of data. This formula only pulls the first row of data. A vlookup formula would not work for me because of the way the data sheets are sorted.

I have attempted to use sumproduct, sum, aggregate, n(If, sumifs to no avail. I just need this formula to pull all 2-10 rows instead of only the first row. My formula seems like it needs just a bit more. Is this possible?

=IFERROR(INDEX(INDIRECT("'"&$S$2&"'!$A$1:$AO$178"),MATCH($B43,INDIRECT("'"&$S$2&"'!$D$1:$D$178"),0),MATCH(S$3,INDIRECT("'"&$S$2&"'!$A$2:$AO$2"),0)),0)
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

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