Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    What are the Odds (XP; SP3)

    Is there a VBA equivalent to the worksheet function =ISODD

    Thanks,
    John

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: What are the Odds (XP; SP3)

    Say you have a variable X of type Integer or Long

    X Mod 2 = 0 if X is even, and 1 or -1 if X is odd, so you can test

    If Not (X Mod 2 = 0) Then
    ...
    End If

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: What are the Odds (XP; SP3)

    Thanks,

    John

Posting Permissions

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