Formula to Count

ststern45

Well-known Member
Joined
Sep 17, 2005
Messages
974
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

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
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,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

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