countifs formula needed

uswyne

Board Regular
Joined
Jul 27, 2017
Messages
78
Office Version
  1. 2019
  2. 2016
  3. 2013
  4. 2010
Platform
  1. Windows
Reg NoClassPGNurKG
20PGrequired answer is 3 instead of 4SameSame
25PG
27Nur
29KG
30PG
PG
Nur
35Nur

<tbody>
</tbody>
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Reg NoClassPGNurKG
20PG321
25PG
27Nur
29KG
30PG
PG
Nur
35Nur

<tbody>
</tbody>

In C2 control+shift+enter, not just enter, and copy across:

=SUM(IF(FREQUENCY(IF($B$2:$B$9=C$1,IF(ISNUMBER($A$2:$A$9),$A$2:$A$9)),$A$2:$A$9),1))

Is this what you are after?
 
Upvote 0
You could also have added in response to post #2 that it's not what you are after. Curious though: If 30 in the record < 30, PG > would have been 25, would the result for PG still be 3?
 
Upvote 0
This is reg no, it could be any number. If student registered in my branch than the registration number will be generated otherwise student would be Transferred In from another branch and registration number field would be blank.

However, i tried this but answer shown in C1 is 6.

You could also have added in response to post #2 that it's not what you are after. Curious though: If 30 in the record < 30, PG > would have been 25, would the result for PG still be 3?
 
Upvote 0
This is reg no, it could be any number. If student registered in my branch than the registration number will be generated otherwise student would be Transferred In from another branch and registration number field would be blank.

However, i tried this but answer shown in C1 is 6.

You didn't say what the value should be... By the way, the formula I suggested should return a different value, not 6.

For the record, the formula I suggested requires control+shift+enter, not just enter. That means: Press down the control and the shift keys at the same time, while you hit the enter kay. If done correctly, Excel itself puts a pair of { and } around the formula in recognition.
 
Upvote 0

Forum statistics

Threads
1,216,116
Messages
6,128,931
Members
449,480
Latest member
yesitisasport

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