Frequency of A Letter In A Range of Cells

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,564
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi folks, hopring someone can give me a hand ...

With vba, how can I count the frequency that the letter "e" exists with the cells of a range?

Considering my range is B2:B6, I need the count of all the letter 'E' in those cells.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
You could use:

Code:
evaluate("SUM(LEN(B2:B6)-LEN(SUBSTITUTE(B2:B6,""e"","""")))")

Note that that is case sensitive.
 
Upvote 0
Hi there. You don't need VBA as you can do it with a formula like this:

=SUMPRODUCT(LEN(B2:B6)-LEN(SUBSTITUTE(B2:B6,"E","")))

If you actually want to do it in vba, then post back.
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,255
Members
449,075
Latest member
staticfluids

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