# single cell counting

#### jimblimm

##### Board Regular
In a2 i have a for digit number
0234

I am trying to create a formula that will tell me if the four digit number in a2 has a "2" inside it.

Also a formula that will count how many 2 are inside the single cell

### Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Try eg:

=SUMPRODUCT(--(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)="2"))

=isnumber(find(2,a1))
and
=len(a1)-len(substitute(a1,2,""))

Using same concept, is there a way to make a formula show how many of the digits in the cell are high digits
Greater than or equal to 5,
And low digits less than or equal to 4

example number

4532

I want the display to read

"1-High 3-Low"

And also in another cell display

The even odd count

Even number
02468

Odd 13579

"2-Odd 2-Even"

But if the number are all even or all odd

"All Even", "All Odd"

or all high and low

"All High, "All Low"

Using same concept, is there a way to make a formula show how many of the digits in the cell are high digits
Greater than or equal to 5,
And low digits less than or equal to 4

example number

4532

I want the display to read

"1-High 3-Low"

And also in another cell display

The even odd count

Even number
02468

Odd 13579

"2-Odd 2-Even"

But if the number are all even or all odd

"All Even", "All Odd"

or all high and low

"All High, "All Low"

Replies
3
Views
110
Replies
3
Views
149
Replies
0
Views
173
Replies
2
Views
147
Replies
0
Views
137

1,202,963
Messages
6,052,824
Members
444,602
Latest member
Cookaa

### 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.

### Which adblocker are you using?

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

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