| View previous topic :: View next topic |
| 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? |
|
| Back to top |
|
 |
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. |
|
| Back to top |
|
 |
karolus OOo Advocate

Joined: 22 Jun 2011 Posts: 208
|
Posted: Wed Apr 25, 2012 12:38 pm Post subject: |
|
|
Hi
| Quote: | | =(SUM(B2:Z2))/(COUNT(B2:Z2)) |
still exists...
Karo |
|
| Back to top |
|
 |
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
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. |
|
| Back to top |
|
 |
jrkrideau Super User

Joined: 08 Aug 2005 Posts: 6733 Location: Kingston ON Canada
|
Posted: Thu Apr 26, 2012 3:53 am Post subject: |
|
|
| Corfy wrote: | | karolus wrote: | Hi
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
Kingston ON Canada
Currently using Windows 7 & OOo 3.4.0 and Ubuntu 12.04 & LibreOffice 3.5.2.2 |
|
| Back to top |
|
 |
|