Index/Match to find column header and count "Pass" in column

Gliffix101

Board Regular
Joined
Apr 1, 2014
Messages
81
Hi All,

I am trying to write a formula that uses Column E data, searches the column headers of the data sheet, and counts all "Pass" values in that column. Here is my formula"

=COUNTIF(INDEX(Sales_Q1,0,MATCH('Question by Role'!E5,Sales_Q2,0)),”Pass”)

Where "Sales_Q1" is the range of the data "=Sales!$A$1:$Q$3822"
Where "Sales_Q2" is the range of the headers "=Sales!$A$1:$Q$1"
Where formula appears on the "Question by Role" sheet

I know it has to be something stupid I'm overlooking, so turning to the online community to laugh at my error and tell me where I went wrong.

Thanks!

Bill
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
It appears your quote marks aren't right:

=COUNTIF(INDEX(Sales_Q1,0,MATCH('Question by Role'!E5,Sales_Q2,0)),Pass)

Change them to the usual marks:

=COUNTIF(INDEX(Sales_Q1,0,MATCH('Question by Role'!E5,Sales_Q2,0)),"Pass")
 
Upvote 0
Ugh - I knew it was going to be something stupid. I tried building the formula is MS Word before copy/paste into Excel and didn't realize the spacing and quotation marks are different. Thank you! RESOLVED!

Bill
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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