Count how many times a number appears

Son

Active Member
Joined
Mar 19, 2010
Messages
284
i have cells with data in the following form:

Cell Contents
A1 = 33
A2 = 334
A3 = 344
B1 = 444

is there a way that i could count how many times the number 4 and the number 3 is repeated in the whole area (eg. number 4 appears 6 times, number 3 appears 5 times)?

i'm looking forward to your thoughts on this.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
i have cells with data in the following form:

Cell Contents
A1 = 33
A2 = 334
A3 = 344
B1 = 444

is there a way that i could count how many times the number 4 and the number 3 is repeated in the whole area (eg. number 4 appears 6 times, number 3 appears 5 times)?

i'm looking forward to your thoughts on this.

If we take A1:B3 as the range of interest and let E1 house 3 and E2 4...

F1, copy down:

=SUMPRODUCT(LEN($A$1:$B$3)-LEN(SUBSTITUTE($A$1:$B$3,E1,"")))
 
Upvote 0
hey, it works!!! Thank you!!!
it's amazing!
i can't figure out how it works, though.
i mean, i know a bit about all the three functions, but i am still not sure how the substitute one works and why i still get the correct result...
anyway, it's all working perfectly.
Once again, i confirm that excel is such a powerful tool, which never ceases to amaze me.
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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