How to count these names?

ravi8

New Member
Joined
Aug 28, 2024
Messages
2
Office Version
  1. 365
Platform
  1. MacOS
  2. Web
Thank you for your help in advanced. I need to help to understand what the formula should be for the total for each column. It needs count Yes once per name. In this name, subject 1 should calculate 4, Subject 2 should calculate 3 and Subject 3 should calculate 2.

If I changed row 5 from Name1 to Name 5, the calculation for Subject 1 should increase to 5.

I hope you can guide me on this please. Thank you so much.
Subject1Subject2Subject3
Name1YesYes
Name1YesYes
Name1Yes
Name1YesYesYes
Name2
Name2Yes
Name2Yes
Name2
Name3YesYes
Name3YesYes
Name3Yes
Name3Yes
Name4YesYesYes
Name4
Name4YesYes
Name4
Total subjects per name[Formula?][Formula?][Formula?]
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
=COUNTA(UNIQUE(FILTER($A$2:$A$17,B2:B17="Yes")))
 
Upvote 1
Solution
Unfortunately that will give you a count of 1 if Yes does not appear anywhere in the column.
Its a bit convoluted to avoid that from happening.

Excel Formula:
=SUM(--(UNIQUE(FILTER($A$2:$A$17,B$2:B$17="Yes",0))<>0))
 
Upvote 1
Just be aware that that will return 1 even if there are no Yes values at all for a Subject. You can avoid that with something like:

Excel Formula:
=IFERROR(ROWS(UNIQUE(FILTER($A$2:$A$17,B2:B17="Yes"))),0)
 
Upvote 1

Forum statistics

Threads
1,221,418
Messages
6,159,791
Members
451,589
Latest member
Harold14

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