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 calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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,975
Messages
6,122,537
Members
449,088
Latest member
RandomExceller01

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