single cell counting

jimblimm

Board Regular
Joined
May 11, 2012
Messages
219
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.
Answer in a3

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

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
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

Answer

"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"
 
Upvote 0
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

Answer

"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"
 
Upvote 0

Forum statistics

Threads
1,223,270
Messages
6,171,103
Members
452,379
Latest member
IainTru

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