OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Integer tally across cells

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
gemmalaming
Newbie
Newbie


Joined: 13 Mar 2012
Posts: 3

PostPosted: Tue Mar 13, 2012 2:37 pm    Post subject: Integer tally across cells Reply with quote

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
View user's profile Send private message AIM Address
ken johnson
Super User
Super User


Joined: 23 Apr 2009
Posts: 2032
Location: Sydney, Australia

PostPosted: Tue Mar 13, 2012 4:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
gemmalaming
Newbie
Newbie


Joined: 13 Mar 2012
Posts: 3

PostPosted: Thu Mar 15, 2012 8:22 am    Post subject: Reply with quote

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 Wink

Thanks for your response. Sorry for the late reply, I was flooded with some urgent translation work.
Back to top
View user's profile Send private message AIM Address
ken johnson
Super User
Super User


Joined: 23 Apr 2009
Posts: 2032
Location: Sydney, Australia

PostPosted: Thu Mar 15, 2012 12:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
gemmalaming
Newbie
Newbie


Joined: 13 Mar 2012
Posts: 3

PostPosted: Thu Mar 15, 2012 1:45 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
ken johnson
Super User
Super User


Joined: 23 Apr 2009
Posts: 2032
Location: Sydney, Australia

PostPosted: Thu Mar 15, 2012 4:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
ozzie
OOo Advocate
OOo Advocate


Joined: 29 Jul 2010
Posts: 397
Location: victoria

PostPosted: Thu Mar 15, 2012 7:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
ken johnson
Super User
Super User


Joined: 23 Apr 2009
Posts: 2032
Location: Sydney, Australia

PostPosted: Thu Mar 15, 2012 9:19 pm    Post subject: Reply with quote

Thanks ozzie, looks good.

Ken Johnson
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group