Average of last two values that are not 0

buckmaster32

New Member
Joined
Mar 15, 2015
Messages
5
Basically I have a 14 week league that I am recording two scores a week for. I'm having a hard time calculating the handicap. This should be the 80% of the average of the sum of score 1 and score 2 for the last 2 weeks there were scores entered, subtracted from 360. If there is scores entered each week there is no problem. Issue i'm having is if a week is missed the handicap is blown way off as it treats the missed week as a 0. I need it to look for the last 2 weeks there was a score and do the calculations on those numbers.

Here is the formula I am using for the current handicap so you get a better understanding what I'm looking for.

=(360-AVERAGE(SUM(BI3:BI4),SUM(BE3:BE4)))*0.8

Below is a table explaining what i'm looking for. the handicap row shows what the results should be.


Week 1Week 2Week 3Week 4Week 5Week 6Week 7
Score 1250300280300300
Score 24050504540
HandicapLook just at 1(56)look to 1&2 (32 hand)look to 1&2 (32 hand)look at 2&4 (16)look at 4&5 (18)look at 4&5 (18)

<tbody>
</tbody>


Any help would be appreciated.

<tbody></tbody>
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
I'm not readily available to put a formula into excel however, I believe tthat you will need to use a combo of column (to encapsulate most recent weeks), if(weed out 0's or ""), and large(to give precedence to the weeks that are most early) all entered as an array formula. If your unsure of how to bring this all together, respond with the columns for this data and I can get a formula to you tomorrow.
 
Upvote 0
I simplified the request but am not familiar with the offset formula. Here is an example. I'm need to sum up the last 2 cells that contain a number in the bottom row. So for this example it would be 342 and 331. From right to left. The Game Score cell is in B2 and the Range is B to R. I need to populate the data in the cell above the 342 cell so that would be R17. If there isn't two values return 0.


Game Score9897100295999897294989799294100100100300
Hit's/X's15161142121511381115113715151242
Handicap/Game
337332331342

<tbody>
</tbody>
 
Last edited:
Upvote 0
Maybe you can adapt this to your needs.
I made some changes to the formula in this link on getting last 3 golf scores.
Daily Dose of Excel » Blog Archive » Sum Last Three Golf Scores

This is an array formula and must be entered with CTRL-SHIFT-ENTER (not just enter)
Excel Workbook
ABCDEFGHIJKLMNOPQ
11. Score9897100295999897294989799294100100100300
2Hit's/X's15161142121511381115113715151242
3Handicap/Game
4337332331342
5
6673
Sheet
 
Upvote 0

Forum statistics

Threads
1,214,540
Messages
6,120,106
Members
448,945
Latest member
Vmanchoppy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top