Thanks I'll give that a try.
>> > How do I find out if a variable is even?
Just make sure you are working with Integers since vba's MOD rounds the
input.
Sub xxx()
Dim n
n = 9.5
'Considered Even
If (n Mod 2) > 0 Then
MsgBox "Odd"
Else
MsgBox "Even"
End If
'Odd
MsgBox WorksheetFunction.IsOdd(9.999999999)
'Even
MsgBox WorksheetFunction.IsOdd(9.9999999999)
End Sub

Signature
HTH :>)
Dana DeLouis
Windows XP & Excel 2007
> Thanks I'll give that a try.
>
[quoted text clipped - 11 lines]
>> > How do I find out if a variable is even?
>> > Thanks