Use cell text in COUNTIFS formula referring to a Table

brucesw

Active Member
Joined
Nov 12, 2002
Messages
304
Office Version
  1. 365
Platform
  1. Windows
I'm counting cells with matching criteria (Blanks) in various Table columns using COUNTIFS as follows in column B; =COUNTIFS(Table1[[#All],[Issue Priority]],"")

The Field/Column "Issue Priority" is in column A and there are many different names down column A. I want to make my formula dynamic and copy down col B referring to the names in col A.

I think I should use INDIRECT but I can't get it right.
=COUNTIFS(Table1[[#All],[INDIRECT(A2)]],"")

I'd love help on a seemingly simple question. Thanks,
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

If you are counting blank cells, I'm not sure what the value in A2 has to do with it.
Or are you trying to count how many times the name in col A occurs?
 
Upvote 1
Thanks for the feedback,
More info;

Cell A2 contains text "Issue Priority" and the relevant formula in B2 is =COUNTIFS(Table1[[#All],[Issue Priority]],"")

A3 has "Category", I want the COUNTIFS formula copied from B1 to B2 to refer to the Category field. Like =COUNTIFS(Table1[[#All],[Category]],"") but dynamic as I have 30 more to reference.

I hope that helps you help me.
 
Upvote 0
Got it;
=COUNTIFS(INDIRECT("Table1[[#All],["&A2&"]]"),"")
 
Upvote 0
Solution
Glad you sorted it & thanks for letting us know.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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