hi i have in a row the foloowing2212122112112
, i needa formula to count how many 2 there are and how many 1.thanks
hi i have in a row the foloowing2212122112112
, i needa formula to count how many 2 there are and how many 1.thanks
Assuming that your string is composed only of "1" and "2",
Then you can chop out the character you're testing against and see what the difference in string lengths is:
So that's counting a total of six "1" and seven "2"Please Login or Register to view this content.
Click the [* Add Reputation] Button to thank people for help!
Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.
=Countif(A1:M1,2) result 7
=Countif(A1:M1,1) result 6
Notice my main language is not English.
I appreciate it, if you reply on my solution.
If you are satisfied with the solution, please mark the question solved.
You can add reputation by clicking on the star * add reputation.
Is that in a single cell, or in different cells across a row?
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks