Mod(number;divisor)

M

Mhek

I would like to get the remainder in a script.

In an excel sheet, I use to write remainder = Mod(number;divisor)

but that function doesn't work with a VBA script.

I tried number%divisor (like I would do in C++) but it didn't work.

What should I do ?

Frank
 
G

Guest

Mod is an operator in VBA

remainder = 23 mod 10
? remainder
3

Note that the behavior is somewhat different from the Excel function for
non integers. See help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top