Counting the sum of valid entries

poor_cookie

New Member
Joined
Dec 16, 2020
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
I would like to count the sum of all the ones from A11 to A17. They are obtained by applying a formula on (A2:B8) and discussed in #post-5605524

1608137244897.png


So, from A11 to A17, the sum will be 3. However, the list of IDs is dynamic (there could be 10 IDs, or 100 IDs). I think the SUM formula can help, but instead of displaying 100 rows of zeroes and ones before summing up, is there a way that I can find the sum of all the ones, regardless of the size of the data, on a single cell?
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
How about
Excel Formula:
=SUM(--(FREQUENCY(IF(B2:B8=D2,A2:A8),A2:A8)>0))
This is an array formula & needs to be confirmed with Ctrl Shift Enter & not just Enter.
 
Upvote 0
Solution
Hello Fluff, thanks for the prompt response. I have tried with your solution, and it worked.

If I changed my ID into a series of alphanumeric characters, the array formula no longer works (the output from the formula is 0 in cell D4) . Could you show us how we can process alphanumeric data as well, or a new thread is required?

1608169009488.png
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,816
Members
449,095
Latest member
m_smith_solihull

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