# Counting Individual Numbers Within Cells

#### rkoehler58

##### New Member
I have a sheet which contains the following:

Column A Column B Column C Column D
Safe 4, 10 Hot 3
Safe 1, 3, 5 Hot 2, 5
Safe 13 Hot 7

Columns B and D may contain multiple entries within a cell.

I am trying to develop a formula to calculate the total number of entries for "Safe and "Hot".

In my example, the number of entries for "Safe" will be 6, while the number of entries for "Hot" would be 4.

Can anyone suggest a way to do this?

### Excel Facts

Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

#### Snakehips

##### Well-known Member
rkoehler,

If the entries will always be separated by a comma then maybe something like.....
<b>Note: Do not try and enter the {} manually yourself</b></td></tr></table><br />
Hope that helps.

Last edited:

#### rkoehler58

##### New Member
rkoehler,

If the entries will always be separated by a comma then maybe something like.....
Excel 2007
ABCDEF
1SafeHot
2Safe4, 10Hot397
3Safe1,3, 5Hot2, 5
4Safe13Hot7
5Safe1, 2, 3Hot1, 2, 3
6

</tbody>
Sheet6

Array Formulas
CellFormula
E2{=SUM(LEN(B2:B20)-LEN(SUBSTITUTE(B2:B20,",",""))+IF(B2:B20="",0,1))}
F2{=SUM(LEN(D2:D20)-LEN(SUBSTITUTE(D2:D20,",",""))+IF(D2:D20="",0,1))}

</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>

Hope that helps.

That works great. Thanks for your help.

Replies
13
Views
365
Replies
12
Views
301
Replies
2
Views
26
Replies
3
Views
76
Replies
5
Views
64