[Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register]

Author Message
Griffiths
Newbie

Joined: 25 Apr 2012
Posts: 1

 Posted: Wed Apr 25, 2012 11:49 am    Post subject: Simple Spreadsheet for golf scores Hello, I'm trying to create a simple spreadsheet application to keep track of golf scores for some friends and I. I would like for it to keep our average score for each hole, as well as our average score for each round. I've had a lot of success so far, but I'm now running into a problem. I need the spreadsheet to not take into account zeros (or blank cells as zero). I've set it up so that we can just plug in our scores for the first 25 rounds, but having played only 12 thus far in the season I've got it creating an overall average of the 12 rounds, plus the 13 rounds that have been left blank. Can anyone help me out with this? Is it a simple formula that I can use?
Corfy
Moderator

Joined: 14 Jun 2005
Posts: 1117
Location: Near Indianapolis, IN, USA

 Posted: Wed Apr 25, 2012 11:57 am    Post subject: How about something like this (adjust the ranges to fit your specific sheet): =(SUM(B2:Z2))/(COUNT(B2:Z2)) This should give you a sum of every number that is in row 2 (from column B through Z) and then divide it by the number of cells that you have populated in that range (that is what the "count" is for.. it counts the cells that have been filled). In this example, the formula would go in AA2, but as I said, feel free to adjust as you see fit. However, any cell that actually has a "0" in it would be counted. Just wanted to warn you._________________Laugh at life or life will laugh at you.
karolus

Joined: 22 Jun 2011
Posts: 208

Posted: Wed Apr 25, 2012 12:38 pm    Post subject:

Hi
 Quote: =(SUM(B2:Z2))/(COUNT(B2:Z2))

 Code: =AVERAGE(B2:Z2)

still exists...

Karo
Corfy
Moderator

Joined: 14 Jun 2005
Posts: 1117
Location: Near Indianapolis, IN, USA

Posted: Wed Apr 25, 2012 12:53 pm    Post subject:

karolus wrote:
Hi
 Code: =AVERAGE(B2:Z2)

still exists...

Karo

Oh, sure, if you want to do it the easy way...

I'm still learning this software, even after 8 years of using it.
_________________
Laugh at life or life will laugh at you.
jrkrideau
Super User

Joined: 08 Aug 2005
Posts: 6733

Posted: Thu Apr 26, 2012 3:53 am    Post subject:

Corfy wrote:
karolus wrote:
Hi
 Code: =AVERAGE(B2:Z2)

still exists...

Karo

Oh, sure, if you want to do it the easy way...

But your code has better documentation

 Quote: I'm still learning this software, even after 8 years of using it.

_________________
jrkrideau
Currently using Windows 7 & OOo 3.4.0 and Ubuntu 12.04 & LibreOffice 3.5.2.2
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 8 Hours Page 1 of 1

 Jump to: Select a forum OpenOffice.org Forums----------------Setup and TroubleshootingOpenOffice.org WriterOpenOffice.org CalcOpenOffice.org ImpressOpenOffice.org DrawOpenOffice.org MathOpenOffice.org BaseOpenOffice.org Macros and APIOpenOffice.org Code Snippets Community Forums----------------General DiscussionSite Feedback
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