Hi,
Can anyone help me with a formula please that will count the number of 1's in a cell.
e.g.
in a cell I may have:
1010110
I would need it to return the answer 4
I have uploaded an example file for reference
Paul
Hi,
Can anyone help me with a formula please that will count the number of 1's in a cell.
e.g.
in a cell I may have:
1010110
I would need it to return the answer 4
I have uploaded an example file for reference
Paul
Last edited by pauldaddyadams; 12-31-2011 at 08:52 AM.
Hi
In a cell(example H1), type the number that you want to count how many times is in Column D.
In E2 put the Array Formula(CSE)
Done!Please Login or Register to view this content.
Hope to helps you.
Regards
Fotis.
-This is my Greek whisper to Europe.
--Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.
Advanced Excel Techniques: http://excelxor.com/
--KISS(Keep it simple Stupid)
--Bring them back.
---See about Acropolis of Athens.
--Visit Greece.
Perfect - thank you!
Happy new year!
Hi pauldaddyadams
YOu have asked to count 1's within a cell
then use the formula
=SUMPRODUCT(--((MID(I2,ROW(INDIRECT("1:"&LEN(I2))),1))="1"))
sorry if I understood wrong.
You are welcome
Happy new Year for you and for your own people!!!
since they are text just use
=LEN(D2)-LEN(SUBSTITUTE(D2,"1",""))
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and now happily retired
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks