Welcome to Catalog Tips

Search more than 200 articles to learn more about creating and automating your product catalogs

Tip: Start typing in the input box for immediate search results.

< All Topics
Print

MOD – Display remainder after division

Overview

This Custom Field returns the remainder after a number is divided by a divisor.

Syntax

MOD(Number, n)

MOD(FIELDSTR(Index), 4)

Number The number to be divided
n The number to be divided by

Example

MOD(FIELDSTR(Index), 4)

Index MOD(FIELDSTR(Index), 4)
4.00 0.00
6.00 2.00
11.00 3.00

In the exaample above, MOD(FIELDSTR(Index), 4) looks at each value in the Index field, divides it by 4, and displays the remainder.

Row 1: 4.00 divided by 4  equals 1 with o remainder so ‘0.00‘ is displayed.

Row 2: 6.00 divided by 4  equals 1 with 2 remainder so ‘2.00‘ is displayed.

Row 3: 11.00 divided by 4  equals 2 with 3 remainder so ‘3.00‘ is displayed.\

See also

MAX

MIN

AVG

MUL

DIV

 

Table of Contents