Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    finding the remainder (VB/VBA)

    I would like to know if there is a function to find out the remainder in a math division. For example, 3/2 will give 1 as the remainder whereas 6/2 will have the remainder as zero.

    Thanks

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: finding the remainder (VB/VBA)

    You want the Mod function (short for the mathematical term Modulus).

    6 Mod 2 = 0
    3 Mod 2 = 1
    47 Mod 10 = 7

    StuartR

  3. #3
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: finding the remainder (VB/VBA)

    Thanks very much.

Posting Permissions

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