I tried this function to give me Prime Number but it ain't working. I can't think of anything. I can do this easily in JS but here it just gives me headache.
Function JeLiProst(N As Integer) As Boolean
If N = 0 Then JeLiProst = False
If N = 1 Then JeLiProst = False
If N = 2 Then JeLiProst = True
For I = 2 To N - 1
If N Mod I = 0 Then
JeLiProst = False
Else
JeLiProst = True
End If
End Function