| View previous topic :: View next topic |
| Author |
Message |
gemmalaming Newbie

Joined: 13 Mar 2012 Posts: 3
|
Posted: Tue Mar 13, 2012 2:37 pm Post subject: Integer tally across cells |
|
|
Hi everyone.
I used to know how to do this, but have forgotten. I cannot now find anything that can remind me.
I would like to make a tally of the integers (1-9) across a given area of cells or an entire speradsheet.
For example given the numbers 1234 5678 and 1324 I would like to know how often 1s and 2s occur.
Can anyone tell me how to do this simply, please. |
|
| Back to top |
|
 |
ken johnson Super User

Joined: 23 Apr 2009 Posts: 1848 Location: Sydney, Australia
|
Posted: Tue Mar 13, 2012 4:04 pm Post subject: |
|
|
With 1234 in A1, 5678 in A2 and 1324 in A3 this formula returns a count of the 1s in A1:A3...
| Code: | | =SUMPRODUCT(LEN(A1:A3)-LEN(SUBSTITUTE(A1:A3;1;""))) | Similarly for the count of 2s... | Code: | | =SUMPRODUCT(LEN(A1:A3)-LEN(SUBSTITUTE(A1:A3;2;""))) | Alternatively, this counts the digit you have entered in B1... | Code: | | =SUMPRODUCT(LEN(A1:A3)-LEN(SUBSTITUTE(A1:A3;B1;""))) |
Ken Johnson _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
gemmalaming Newbie

Joined: 13 Mar 2012 Posts: 3
|
Posted: Thu Mar 15, 2012 8:22 am Post subject: |
|
|
Thanks Ken. I have tried it but it didn't like the LEN command.
At present I am using a Dutch version of Calc. Could you please tell me what this command stands for and I might be able to find it in the commands in my system.
Unless you happen to know the Dutch command of course
Thanks for your response. Sorry for the late reply, I was flooded with some urgent translation work. |
|
| Back to top |
|
 |
ken johnson Super User

Joined: 23 Apr 2009 Posts: 1848 Location: Sydney, Australia
|
Posted: Thu Mar 15, 2012 12:54 pm Post subject: |
|
|
LEN (English) is LENGTE (Dutch).
Changing the other functions yields...
| Code: | =SOMPRODUKT(LENGTE(A1:A3)-LENGTE(SUBSTITUEREN(A1:A3;1;"")))
=SOMPRODUKT(LENGTE(A1:A3)-LENGTE(SUBSTITUEREN(A1:A3;2;"")))
=SOMPRODUKT(LENGTE(A1:A3)-LENGTE(SUBSTITUEREN(A1:A3;B1;""))) |
Ken Johnson _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
gemmalaming Newbie

Joined: 13 Mar 2012 Posts: 3
|
Posted: Thu Mar 15, 2012 1:45 pm Post subject: |
|
|
Brilliant, Ken.
I looked online to find this info, but to no avail. Obviously you have the keys to Calc!
I will check out your ideas when I have a moment. Thankyou very much for your help. It is appreciated. Gemma |
|
| Back to top |
|
 |
ken johnson Super User

Joined: 23 Apr 2009 Posts: 1848 Location: Sydney, Australia
|
Posted: Thu Mar 15, 2012 4:30 pm Post subject: |
|
|
| gemmalaming wrote: | | I looked online to find this info, but to no avail. Obviously you have the keys to Calc! |
I made this spreadsheet using an xl doc I found on the web...
http://www.mediafire.com/view/?qsv385vt06bj54n
You might find it useful for these situations.
Ken Johnson _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button).
Last edited by ken johnson on Mon Sep 24, 2012 5:13 am; edited 1 time in total |
|
| Back to top |
|
 |
ozzie OOo Advocate

Joined: 29 Jul 2010 Posts: 316 Location: victoria
|
Posted: Thu Mar 15, 2012 7:35 pm Post subject: |
|
|
open office - 30 odd languages - and the ability to add more.
unfortunately i don't remember where i got it from but i would like to express my thanks to all involved
http://www.mediafire.com/?dio0lfixoaozbig _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
ken johnson Super User

Joined: 23 Apr 2009 Posts: 1848 Location: Sydney, Australia
|
Posted: Thu Mar 15, 2012 9:19 pm Post subject: |
|
|
Thanks ozzie, looks good.
Ken Johnson |
|
| Back to top |
|
 |
|