sumif over dynamically changing tab names

Bering

Board Regular
Joined
Aug 22, 2018
Messages
185
Office Version
  1. 2016
Platform
  1. Windows
Hello,

I have a spreadsheet with a number of tabs (say 3), each contacting a table starting from cell A1, except for a tab called "Summary".

The structure of the table is the same in each tab (4 columns - please see example below) and each table has the same name as the corresponding tab (worksheet).

What I would like to do is:

in tab "Summary"

create a sumif formula that refers to the Table Name in column A and sums all the items relative to Client A:
I have been trying for quite some time to amend the below formula so that it is dynamically linked to cells A2-A4 but I am stuck..:p

Formula in tab "Summary", cells C2 - C4

=SUMIF(Table2[[#All],[Client]],Summary!C2,Table2[[#All],[Number of items]])


Tab Summary, Range A1 - C4

Table nameClientSumif
Table1A600
Table2A50
Table3A21

<tbody>
</tbody>


Example of Table2
Item noClientNumber of itemsDescription
1A50grh
2B100fjfj
3C200kyk

<tbody>
</tbody>

I the above is not clear, please do let me know and will try my best to clarify my query.

Any suggestions?

Many thanks.
 
Last edited:

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hello,

If I understand correctly ... the dynamic part is Table 2 ... which you would like to have as a variable ...

Are you familiar with the Indirect() function ...?
 
Upvote 0
Solution
Hello, well I tried this but of course it does not work... thanks

SUMIF(INDIRECT(A2)[[#All],[Client]],Summary!C2,INDIRECT(A2)[[#All],[Number of items]])
 
Upvote 0
I think I got it

SUMIF(INDIRECT($A2&"[[#All],[Client]]"),Summary!C2,INDIRECT($A2&"[[#All],[Number of items]]"))

Thank James006 for the tip.
 
Upvote 0
Well done ...!!! :)

Congratulations ... :wink:
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,438
Members
449,083
Latest member
Ava19

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