Numbers -- if I add a row, formula does not include the new row.

Hello. Sorry, but I know just enough Numbers to get in trouble...

I worked out a spreadsheet to record our golf scores along with all the other info needed to calculate our handicaps. Recently I noticed that as I add a row to the top and subtract one from the bottom, the "designation" of the cells selected changes to include the same ones it had before, ex., from '$H$2:$H$21' to '$H$3:$H$22', and the first row is not included. It took me a few weeks to notice this -- see the attached pic (I was hand-deleting the rows excess of 21 when I noticed the problem).

Any ideas?

Thanks in advance for any help. Developing this thing has literally been my only experience with a spreadsheet and it took way too much time, and I seem to have forgotten even the basics presently.

PS., while I have your attention, is there a way to limit the number of rows, ie., when I add a row for data, it goes down 20 rows and deletes the last (handicap is determined by best 8 scores of last 20).

Thanks again!

iMac (2017 – 2020)

Posted on Aug 3, 2023 12:53 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 3, 2023 10:53 PM

Here's an example that may give you some insights. I've set it for a single player, but adding others should require only adding a score column for each player, and copying the formulas doing the calculations into new columns to create a set for each player.


I've used three tables: one on which to record the scores, a second to extract the scores needed to calculate the handicaps, and a third to display the result(s).



Table 1 contains no formulas, and is used only to record the dates and scores of each game.


Table 1-1 collects the scores of the most recently entered 20 games in column A, modifies them, adding a small fractional value to each one to ensure that there are no duplicate scores, extracts the eight best scores and places them in Column C.


Table 1-2 (renamed Handicap) collects the eight best (modified) scores, then calculates the average of those eight, and strips the fractional amount and returns the integer average score for the most recent 20 games



Table 2 formula, entered in cell A2, and filled down to A21:

Setting the offset starting point to B1, and locking the row reference to that row, then setting the RowOffset to one less than the row in which this copy of the formula is placed ensures that the first score transferred to A2 of Table 1-1 will always come from (the current) row 2 of Table 1, and the last value in the list will come from (the current) row 21.


Table 1-3 ("Handicap") uses this formula to calculate the Integer Average of the 8 best scores (listed in rows 2 to 9 of Table 1-1, and presents that as the Handicap score level.


Formula in Handicap:A1:


(Note that the player has inserted a new 'Row 2, and entered a new round's score (better than any of the others)



You mentioned that the handicap 'is determined by best 8 scores of last 20 (rounds)', but gave no details regarding how it was clculated from those values. For the 'integer Average' vlue calculated above, my formula was the one shown above, entered in cell A1 of Handicap. The actual calculation may require a different formula. If so, please provide a description of the calculation to be performed on these eight scores.


Regards,

Barry

8 replies
Question marked as Top-ranking reply

Aug 3, 2023 10:53 PM in response to Tripleoh

Here's an example that may give you some insights. I've set it for a single player, but adding others should require only adding a score column for each player, and copying the formulas doing the calculations into new columns to create a set for each player.


I've used three tables: one on which to record the scores, a second to extract the scores needed to calculate the handicaps, and a third to display the result(s).



Table 1 contains no formulas, and is used only to record the dates and scores of each game.


Table 1-1 collects the scores of the most recently entered 20 games in column A, modifies them, adding a small fractional value to each one to ensure that there are no duplicate scores, extracts the eight best scores and places them in Column C.


Table 1-2 (renamed Handicap) collects the eight best (modified) scores, then calculates the average of those eight, and strips the fractional amount and returns the integer average score for the most recent 20 games



Table 2 formula, entered in cell A2, and filled down to A21:

Setting the offset starting point to B1, and locking the row reference to that row, then setting the RowOffset to one less than the row in which this copy of the formula is placed ensures that the first score transferred to A2 of Table 1-1 will always come from (the current) row 2 of Table 1, and the last value in the list will come from (the current) row 21.


Table 1-3 ("Handicap") uses this formula to calculate the Integer Average of the 8 best scores (listed in rows 2 to 9 of Table 1-1, and presents that as the Handicap score level.


Formula in Handicap:A1:


(Note that the player has inserted a new 'Row 2, and entered a new round's score (better than any of the others)



You mentioned that the handicap 'is determined by best 8 scores of last 20 (rounds)', but gave no details regarding how it was clculated from those values. For the 'integer Average' vlue calculated above, my formula was the one shown above, entered in cell A1 of Handicap. The actual calculation may require a different formula. If so, please provide a description of the calculation to be performed on these eight scores.


Regards,

Barry

Aug 4, 2023 10:02 AM in response to Tripleoh

Tripleoh wrote:

I have data set up underneath, so that the "column" has a definite end.


Not sure exactly what your table looks like. But "the Numbers way" would to be avoid having unrelated data (or formulas) somewhere down below in the body cells of a table.


Use Footer Rows to hold formulas that can refer to the entire column. It's much simpler that way, and automatically adjusts for the addition of new rows.


And put unrelated data in a separate table, on the same sheet if that fits your needs.


See the examples of effective Numbers document design in the templates at File > New in your menu.


SG

Aug 3, 2023 11:21 PM in response to Tripleoh

Here's an example that may give you some insights. I've set it for a single player, but adding others should require only adding a score column for each player, and copying the formulas doing the calculations into new columns to create a set for each player.


I've used three tables: one on which to record the scores, a second to extract the scores needed to calculate the handicaps, and a third to display the result(s).



Table 1 contains no formulas, and is used only to record the dates and scores of each game.


Table 1-1 collects the scores of the most recently entered 20 games in column A, modifies them to ensure that there are no duplicate scores, extracts the eight best scores and placeTable 1-2s them in Column C.


Table 1-2 (renamed Handicap) collects the eight best (modified) scores, then calculates the average of those eight, and strips the fractional part and returns the handicap score.


Here's an example that may give you some insights. I've set it for a single player, but adding others should require only adding a score column for each player, and copying the formulas doing the calculations into new columns to create a set for each player.


I've used three tables: one on which to record the scores, a second to extract the scores needed to calculate the handicaps, and a third to display the result(s).




Table 1 contains no formulas, and is used only to record the dates and scores of each game.


Table 1-1 collects the scores of the most recently entered 20 games in column A, modifies them, adding a small fractional value to each one to ensure that there are no duplicate scores, extracts the eight best scores and places them in Column C.


Table 1-2 (renamed Handicap) collects the eight best (modified) scores, then calculates the average of those eight, and strips the fractional amount and returns the integer average score for the most recent 20 games



Table 2 formula, entered in cell A2, and filled down to A21:


Setting the offset starting point to B1, and locking the row reference to that row, then setting the RowOffset to one less than the row in which this copy of the formula is placed ensures that the first score transferred to A2 of Table 1-1 will always come from (the current) row 2 of Table 1, and the last value in the list will come from (the current) row 21.


Table 1-3 ("Handicap") uses this formula to calculate the Integer Average of the 8 best scores (listed in rows 2 to 9 of Table 1-1, and presents that as the Handicap score level.


Formula in Handicap:A1:



(Note that the player has inserted a new 'Row 2, and entered a new round's score (better than any of the others)



You mentioned that the handicap 'is determined by best 8 scores of last 20 (rounds)', but gave no details regarding how it was clculated from those values. For the 'integer Average' vlue calculated above, my formula was the one shown above, entered in cell A1 of Handicap. The actual calculation may require a different formula. If so, please provide a description of the calculation to be performed on these eight scores.


Regards,

Barry


PS: To insert a new 'Row 2' on Table 1:


Single click on the Date cell in the current Row 2.

Press option-up arrow to insert a new row above Row2.

The new row will be the same type ('standard') as the selected one.


Had you clicked on cell A1, then pressed option-down arrow, a new row 2 would be inserted below row 1, but it would be a Header row — not the type you want here.


B.


Aug 3, 2023 2:03 PM in response to Tripleoh

If you are new to Numbers you may find the User Manual helpful. It's available in your menu via Help > Numbers Help.


In particular you could start with this, paying attention to Header and Footer Rows:


Add or remove rows and columns in Numbers on Mac - Apple Support


A formula in a Footer Row can refer to the entire column above it, so that it automatically includes new rows as you add them.


And this:


Calculate values using data in table cells in Numbers on Mac - Apple Support


Also have a look at the templates at File > New in your menu.


SG

Aug 3, 2023 11:27 PM in response to Barry

Apologies for the double post above. the second was showing the pink tint & saying 'wait a bit then try again.'


After three or four attempts, I went back to the first one, entered a minor edit, and resent it. Apparently that disturbance was enough to also sent the second version on its way!


Regards,

Barry

Aug 4, 2023 9:51 AM in response to SGIII

Thanks for the quick reply! I think the problem here is that I have data set up underneath, so that the "column" has a definite end. I'm aware how to add rows, and if I had set it up such that there was no additional, unrelated data in the rows below it would make my life easier. However, for (LOL) simplicity's sake--rather, for the sake of elegance -- I chose to have the additional (low diff) data underneath. Less scrolling. So in this case the summation is in (several) unrelated columns.

Aug 4, 2023 10:13 AM in response to Barry

Wow, Barry, that was great. The "offset" start of the function was exactly what I was looking for!


Now if I could only get numbers on my scorecard like I'm seeing on yours!


BTW, here is the info I'm gathering/calculating: For each course I mark the slope rating and the course rating, then each person's scores. I will hand-correct the AGS (given that per your handicap you can't count strokes above a certain amount), then I calculate the difference between AGS and par (the "diff). From there I pull the lowest 8 diffs, then run those through the formula (see attached) and get everyone's handicap. For the next round I punch in the course rating and slope and then figure out strokes based on lowest handi = scratch. Frankly we were all amazed at how accurate keeping real handicaps works, we play teams based on drawing straws and it usually comes down to the 18th, making for much more enjoyable rounds!


I'm going to consider this answered, but if you have any questions regarding my formulae (at the bottom of the attached, please feel free to ask. Thanks again!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Numbers -- if I add a row, formula does not include the new row.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.