简体   繁体   中英

Excel Formula for Entering a New Cell Numerical Value When Another Cell Numerical Value is Some Number

I have one cell that has an INDEX value (eg 23.1). There is another cell (COURSE HANDICAP) that takes this INDEX value and rounds the index using the following: =IF(E3-INT(E3)<0.5,ROUNDDOWN(E3,0),ROUNDUP(E3,0)). When rounded, it gives me golfer's course handicap (eg 25 strokes).

Now I want to take the INDEX value (25) and distribute the golfer's strokes to the handicap holes. For example, handicap holes #1 thru #18 are handicapped according to difficulty as 1, 15, 7, 17, 3, 9, 5, 13, 11, 8, 12, 4, 6, 16, 14, 2, 10, and 18, respectively.

results with 18 handicap

HOLE | DIFFICULTY | HDCP
01   | 01         | 1
02   | 15         | 1
03   | 07         | 1
04   | 17         | 1
05   | 03         | 1
06   | 09         | 1
07   | 05         | 1
08   | 13         | 1
09   | 11         | 1
10   | 08         | 1
11   | 12         | 1
12   | 04         | 1
13   | 06         | 1
14   | 16         | 1
15   | 14         | 1
16   | 02         | 1
17   | 10         | 1
18   | 18         | 1

If a player has a course handicap of 18 strokes, then that player gets 1 stroke per hole, distributed evenly to each of the 18 holes. However if the player's handicap is 25, he gets the follow stroke distribution:

  1. Handicap Hole #1 = 2 strokes
  2. Handicap hole #2 = 2 strokes
  3. Handicap hole #3 = 2 strokes
  4. Handicap hole #4 = 2 strokes
  5. Handicap hole #5 = 2 strokes
  6. Handicap hole #6 = 2 strokes
  7. Handicap hole #7 = 2 strokes
  8. Handicap hole #8 = 1 stroke
  9. Handicap hole #9 = 1 stroke
  10. Handicap hole #10 = 1 stroke
  11. Handicap hole #11 = 1 stroke
  12. Handicap hole #12 = 1 stroke
  13. Handicap hole #13 = 1 stroke
  14. Handicap hole #14 = 1 stroke
  15. Handicap hole #15 = 1 stroke
  16. Handicap hole #16 = 1 stroke
  17. Handicap hole #17 = 1 stroke
  18. Handicap hole #18 = 1 stroke

Total Strokes = 25

Note that handicap hole #1 is the most difficult and therefore gets 2 strokes, etc. As the individual COURSE HANDICAP value changes (in this case, 18 or 25), so do the number of strokes allotted per handicap hole.

I want to be able to take the value in the COURSE HANDICAP cell (eg 25) and distribute the handicap strokes to the proper handicap holes. Since the players' course handicaps will vary, so will the strokes allotted per handicap hole.

I am also looking for a reliable iOS app builder.

Brings back memories of doing this in FORTRAN for our golf league.

Two parts: First, how many times does 18 go into the course handicap, Second, what is the remainder of the course handicap modulo 18

For holes numbered greater than the remainder, stick in the first number, the easy holes. For holes numbered less than or equal to the remainder, stick in the first number plus 1, the hard holes.

This formula is similar to what you want to do, including plus handicaps like -4. B$1 is where the handicap is stored. A2 is the difficulty rating for a particular hole. =IF(A2>MOD(B$1,18),FLOOR(B$1/18),FLOOR(B$1/18)+1)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM