Indirectly referencing table column title (from another cell) in formula

alfiedee

New Member
Joined
Jan 24, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
I've created a table (let's be original and call it "Table"), with various columns representing tags that are associated with each row item (Tag1, Tag2, etc.). Those columns would contain "1" if that row is associated with that particular tag.

On a different sheet, I've put together a report that also contains those tag titles, and it would summarize certain values from the table for rows that are associated with the tag.

E.g. (on the Report sheet)
Cell A1: "Tag1"
Cell B1: =SUMIF(Table[Value],Table[Tag1],1)
Cell A2: "Tag2"
Cell B2: =SUMIF(Table[Value],Table[Tag2],1)
etc.

I'd like to reference the tag label from the actual cells in A1, A2, etc. rather than manually type each tag's labels throughout the formulae (the actual formula is a longer SUMIFS).
I've tried:
Cell B2: =SUMIF(Table[Value],Table[INDIRECT(A1)],1)
But that didn't seem to work.

Any advice?

Thanks in advance
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
It would need to be
Excel Formula:
=SUMIF(Table[Value],INDIRECT("Table["&A1&"]"),1)
 
Upvote 0
Another option without using the dreaded Indirect function is
Excel Formula:
=SUMIF(Table[Value],index(Table,,match(A1,Table[#Headers],0)),1)
 
Upvote 0
Solution
Gotcha, thanks. I was actually wondering why INDIRECT has such a bad reputation :)
 
Upvote 0

Forum statistics

Threads
1,215,734
Messages
6,126,543
Members
449,316
Latest member
sravya

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