Formula 6

Operators/Functions Used

If-Then-Else, Greater than (>), Percentage (%), Greater than or equal (>=), Boolean Operator (And), Boolean Operator (Or), Parentheses ()

Formula Purpose

The manager of a minor league baseball team wants a column on the statistics report that flags all batting averages of .300 or better and all averages below .200. The manager does not want the batting average flagged for any player who has batted fewer than 100 times because the manager does not feel that such a batting average is statistically significant.

Formula

If ({file.ATBAT}>=100) And 
(({file.HITS} % {file.ATBAT}>=30) Or
({file.HITS} % {file.ATBAT}<20)) Then
    "####"
Else
    ""

Result

Hits AtBat Average Flag Explanation

31

98

.316


AtBat <100 (not significant)

31

101

.307

####

Average > 30 (.300)

43

216

.199

####

Average < 20 (.200)

19

99

.192


AtBat < 100 (not significant)

Explanation

Related topics

Formulas In Action



Seagate Software, Inc.
http://www.seagatesoftware.com
Please send comments to:
techpubs@seagatesoftware.com