SOLVED

golf league formula to calculate and flag age

Copper Contributor

I maintain records for a senior's golf league.  In one workbook, Master List, each player's personal information is kept including his birth date.  The second workbook, Weekly Scores is for recording each week's scores for the players.  The names and other information are currently linked between these workbooks by league flight.

Our league awards players for scoring a round under his age, (last season a player 92 years old shot a 91).

I added a DATEDIF column in the Master List to return the age in years, but I want to add a 'flag', maybe the weekly score cell highlighted when a score is entered under the player's age.

Also, what function must be included to DATEDIF to return a blank cell when the DOB cell is blank?

Thanks in advance for any assistance!

 

7 Replies

@DaveHill 

Let's say you enter date of birth in D2 and down. The formula for the age could be

 

=IF(D2="","",DATEDIF(D2,TODAY(),"Y"))

Thank you! That helped.

@DaveHill 

What exactly do you mean by "flagging"? (Please keep in mind that I know nothing about golf)

By flagging I mean, some type of a notification that the player scored under his age for that round of golf.
My thought was, as the scores are entered into the cell it would change color to flag the score is less than his age. This may not necessarily how best to 'flag' the score to age, but some notification, please.
We have about 60 seniors playing so comparing each score each week to the player's age would be time consuming.
The age of each player, I now have calculated in the "Master List"1 workbook using the formula you suggested. The scores each week are manually entered in the workbook "Weekly Scores" behind each player's name. Each name is linked to the Master List now.
This is where the scores are recorded.
https://drive.google.com/file/d/1enrwOC98Vd4I-_y8jfAEVj1E2qiXZ8a7/view
best response confirmed by DaveHill (Copper Contributor)
Solution

@DaveHill 

Thank you.

Let's say you have the ages in E2 and down, and scores elsewhere in row 2 and down.

Select the range with the scores.

The active cell in the selection should be in the top row of the range, in this example in row 2.

On the home tab of the ribbon, select Conditional Formatting > New Rule...

Select 'Format only cells that contain'.

Leave the first drop down set to 'Cell Value'.

Select 'less than' from the second drop down.

In the box next to it, enter the formula   =$E2

Remember, E is the column with the ages and 2 is the row of the active cell.

Click Format...

Activate the Font tab.

Select a font color, and perhaps other settings such as Bold.

Click OK, then click OK again.

That will work after I link the calculated age from the Master List workbook to an empty cell in the Weekly Scores workbook.
Danke Schoen!
1 best response

Accepted Solutions
best response confirmed by DaveHill (Copper Contributor)
Solution

@DaveHill 

Thank you.

Let's say you have the ages in E2 and down, and scores elsewhere in row 2 and down.

Select the range with the scores.

The active cell in the selection should be in the top row of the range, in this example in row 2.

On the home tab of the ribbon, select Conditional Formatting > New Rule...

Select 'Format only cells that contain'.

Leave the first drop down set to 'Cell Value'.

Select 'less than' from the second drop down.

In the box next to it, enter the formula   =$E2

Remember, E is the column with the ages and 2 is the row of the active cell.

Click Format...

Activate the Font tab.

Select a font color, and perhaps other settings such as Bold.

Click OK, then click OK again.

View solution in original post