Formula to Count

ststern45

Well-known Member
Joined
Sep 17, 2005
Messages
961
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I have a list of 10 random values (000 through 999) in cell range A1 through A10.

In any of the 3 positions
In Cell B1 I wanted to find out how many of the values in cell range A1 through A10 contain the value of 0
In Cell C1 I wanted to find out how many of the values in cell range A1 through A10 contain the value of 1
In Cell D1 I wanted to find out how many of the values in cell range A1 through A10 contain the value of 2
In Cell E1 I wanted to find out how many of the values in cell range A1 through A10 contain the value of 3
In Cell F1 I wanted to find out how many of the values in cell range A1 through A10 contain the value of 4
In Cell G1 I wanted to find out how many of the values in cell range A1 through A10 contain the value of 5
In Cell H1 I wanted to find out how many of the values in cell range A1 through A10 contain the value of 6
In Cell I1 I wanted to find out how many of the values in cell range A1 through A10 contain the value of 7
In Cell J1 I wanted to find out how many of the values in cell range A1 through A10 contain the value of 8
In Cell K1 I wanted to find out how many of the values in cell range A1 through A10 contain the value of 9

Thank you in advance
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
B1, drag accross:
Code:
=SUMPRODUCT(--ISNUMBER(SEARCH(COLUMN()-2,$A$1:$A$10)))
 
Upvote 0
Thank you.
I will apply your formula later this morning.
 
Upvote 0
Or try this in B1:

=LEN($A$1&$A$2&$A$3&$A$4&$A$5&$A$6&$A$7&$A$8&$A$9&$A$10)- LEN(SUBSTITUTE($A$1&$A$2&$A$3&$A$4&$A$5&$A$6&$A$7&$A$8&$A$9&$A$10,COLUMNS($B$1:B1)-1,""))
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,294
Members
449,077
Latest member
Rkmenon

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