Find the remainder from division

# Thread: Find the remainder from division

1. Senior Member
Join Date
Dec 1969
Posts
1,013

## Find the remainder from division

I want to divide a number by 23 and use the remainder from that equation as part of a validation script.<BR>What function/property/method should I use to acieve this?<BR>Thanks in advance<BR>Chris

2. CousinIT Guest

## RE: Find the remainder from division

Divides the value of one expression by the value of another, and returns the remainder.<BR><BR>result = number1 % number2<BR><BR>Arguments<BR>result<BR><BR>Any variable..<BR><BR>number1<BR><BR>Any numeric expression.<BR><BR>number2<BR><BR>Any numeric expression. <BR><BR>Remarks<BR>The modulus, or remainder, operator divides number1 by number2 (rounding floating-point numbers to integers) and returns only the remainder as result. For example, in the following expression, A (which is result) equals 5. <BR><BR>A = 19 % 6.7<BR>

3. Moi
Member
Join Date
Dec 1969
Posts
84

## RE: Find the remainder from division

For integer math, use mod(), e.g.<BR><BR>remainder = x mod 23<BR><BR>Otherwise, use:<BR><BR>remainder = x - (int(x/23) * 23)<BR><BR><BR><BR>

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•