Results 1 to 4 of 4

Mod function in VBA

This is a discussion on Mod function in VBA within the Excel Questions forums, part of the Question Forums category; How can I use the MOD function in VBA ? I would like to divide a number by nine and ...

  1. #1
    New Member
    Join Date
    Apr 2009
    Posts
    24

    Question Mod function in VBA

    How can I use the MOD function in VBA? I would like to divide a number by nine and keep only the remainder.

  2. #2
    xld
    xld is offline
    Banned
    Join Date
    Feb 2003
    Location
    The Kingdom of Wessex
    Posts
    5,378

    Default Re: Mod function in VBA

    If it is integers then

    Code:
    ans = 20 MOD 9

  3. #3
    New Member
    Join Date
    Apr 2009
    Posts
    24

    Default Re: Mod function in VBA

    Thanks.

  4. #4
    Board Regular
    Join Date
    Jul 2011
    Posts
    214

    Default Re: Mod function in VBA

    Quote Originally Posted by xld View Post
    If it is integers then

    Code:
    ans = 20 MOD 9
    thanks from me as well pete (EDUCATED MONKEY ON HERE)

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com