Formula 11

Operators/Functions Used

If-Then-Else, Subscript [], Not equal to (<>), Maximum([array]), Multiply (*), Parentheses ().

Formula Purpose

As part of a charity fund raiser, a company agrees to donate 1% of the invoice amount (or $1.00, whichever is larger) for each invoice it cut during the previous quarter. The only invoices that it has exempted are Credit Invoices (identified with the letter "C" as the 6th character in the invoice number) and invoices for non-profit agencies (identified with the letter "N" as the 6th character in the invoice number). Management wants a Contribution column to appear on the quarterly detail sales report.

Formula

If {file.INV#}[6]<> "C" and {file.INV#}[6]<>"N" Then
    $(Maximum([.01 * {file.AMT}), 1])
Else
    0

Result

Invoice # Amount Amt. * 1% To Charity Reason

21523R

143.27

1.43

$1.43


21524C

223.46

N/A

0

«credit»

21538R

47.15

.47

$1.00


21575N

1312.49

N/A

0

«nonprofit»

Explanation

Comments

An alternative rendering follows:

If {file.INV#}[6] in ["C", "N"] Then
    0
Else
    Maximum([.01*{file.AMT}, 1])
Related topics

Formulas In Action



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