Using vlookup/indirect/sumif to return sum of results from variable reference tab

BS1234

New Member
Joined
Dec 17, 2019
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
I have a workbook with an index, that returns all of my tab names in column B (=INDEX(listsheets,A6). This is then used to search specific data (row 3) within each tab using the formula =VLOOKUP($E$3,INDIRECT("'"&B6&"'!"&"b3:F500"),5,0).

The data on row 3 of my index tab, is searched for in column B of my following tabs (200+), the formula then returns the value of column F of the matched cell in B.

This formula works, until there are more than one matching cells in column B of my following tab, then it only returns one of the figures.

I need it to return the sum column F of all matched cells from column B. I've tried to build in the SUMIF function, but can't get it to work with my INDIRECT.

Also when there are no results the current formula returns "#N/A", i would ideally like this to return "0".

1576604640989.png


1576604669121.png



Could someone please help?

Thank you
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I haven't tested this yet, since I'd have to create a sample workbook, but the formula should be like this:

=SUMIF(INDIRECT("'"&B6&"'!B3:B500"),E$3,INDIRECT("'"&B6&"'!E3:E500"))

Try that, and if it doesn't work, I'll build up the test sheets.
 
Upvote 0
Try this

Book1
ABCDEFGH
1
2
3X1X2X3X4
41Index
52A4854600
63B0000
74C0000
85D0000
96E0000
Index
Cell Formulas
RangeFormula
E5:H9E5=IFERROR(SUMIF(INDIRECT("'"&$B5&"'!B3:B500"),E$3,INDIRECT("'"&$B5&"'!F3:F500")),0)
 
Upvote 0

Forum statistics

Threads
1,223,632
Messages
6,173,472
Members
452,516
Latest member
archcalx

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