Formula 14

Operators/Functions Used

If-Then-Else, Length, TrimLeft, Less than or equal (<+), Parentheses ().

Formula Purpose

Five and a half years earlier, a company had changed from a lifetime warranty for its products to a five year warranty. The first products that had been manufactured with the shorter warranty were now out of warranty, but the repair department was slow to adapt. It continued to repair all products for free, as if they were all covered by the original lifetime warranty.

All products manufactured under the new, shorter warranty had issued eight character serial numbers instead of the five, six, or seven character serial numbers that had been issued to lifetime-warranted products.

To begin controlling the situation, management has called for a column on its repair report that identifies products serviced as either lifetime warranty or five year warranty products.

Formula

If Length(TrimLeft({file.SERIAL#}))<= 7 Then 
    "Lifetime Warranty"
Else
    "5 Year Warranty"

Result

Serial Number # Characters Flag

BP10001

7

"Lifetime Warranty"

BP1000

6

"Lifetime Warranty"

BP999

5

"Lifetime Warranty"

BP100001

8

"5 Year Warranty"

Explanation

Related topics

Formulas In Action



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