Function isEven(var As Double)
var = var / 2
var = Round(var, 1)
If (Right(var, 1) = 5) Then
Even
Else
Odd
End If
End Function
Option Explicit
Function myIsEven(myCell As Range) As Boolean
Dim dblSum As Double
dblSum = Application.WorksheetFunction.Sum(myCell)
myIsEven = dblSum Mod 2 = 0
End Function
<CODE>@Blad Hunter:</CODE>
<CODE></CODE>
<CODE>Sorry, I wasn't clear. I was referring to what the expected results of Mod would be, vs the expected results of the worksheet function ISEVEN.</CODE>
<CODE></CODE>
Mark
Function VBAIsEven(inputVal As Double) As Boolean
VBAIsEven = Evaluate("ISEVEN(" & CStr(inputVal) & ")")
End Function
Mod divides X by the number stipulated and if there is no remainder (ie it's a perfect division) then it returns true otherwise it returns false.