count cells based on the row and column headings in excel

trenteb

New Member
Joined
Dec 19, 2023
Messages
7
Office Version
  1. 2021
Platform
  1. Windows
Hi, I am attempting to count the number of times a certain criteria occur based on varying column & row headings. the same Row & Column headings appear multiple times in the data set. I have tried countifs with index & match functions but have been unable to get it to work. Hoping someone can assist.
 

Attachments

  • Sample.png
    Sample.png
    125 KB · Views: 19

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Welcome to the MrExcel board!

For the future, it would help greatly if you provided sample data (& expected results) with XL2BB so helpers don't have to manually type out sample data to test with & show results. :)

See if this does what you want. (I coloured some manually for visual checking)

23 12 19.xlsm
ABCDEFGHI
1xxyxyyyz
2aNCdNCLdWWL
3aWLLWIddI
4aWNCLdddLI
5bdLWLNCILd
6bNCWLdddII
7cNCLNCIIIIL
8cIdIIWWdNC
9cNCdLLWLNCL
10cdNCNCdWddI
11cNCIWNCNCLdL
12cLNCWNCdIdW
13
14xyz
15aW320
16I012
17NC210
18L231
19d250
20bW110
21I021
22NC110
23L220
24d221
25cW061
26I451
27NC741
28L333
29d460
Counting
Cell Formulas
RangeFormula
C15:E29C15=SUMPRODUCT(($A$2:$A$12=LOOKUP("zz",$A$15:$A15))*($B$1:$I$1=C$14)*($B$2:$I$12=$B15))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
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