Forum Discussion

Peter_Potteiger's avatar
Peter_Potteiger
Copper Contributor
Dec 21, 2021

Count function

How can i count the number of characters in a range  of cells. What i am trying to do is figure out as an example how many #1's , #2's and so forth are in a range of cells.  So i know how many of each # i need to purchase to number team uniforms. 

2 Replies

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    Peter_Potteiger The trick is to create on long string of all numbers. Then split it in individual digits and then count all digits (0-9). In newer versions of Excel you can use TEXTJOIN and SEQUENCE to achieve this relatively easily. In older Excel versions that do not support the CONCAT function, you have to do a bit extra work to create the initial string of numbers. I have demonstrated all of these in the attached file. If your Excel version does not support a method, you'll notice it immediately. The result of the count is in columns G and H.

Resources