View Single Post
  #1   Report Post  
Dan
 
Posts: n/a
Default

Here is a simple function. Need to add this in a module in VBA.

Function test(ByVal intVal As Integer) As Integer
If intVal < 0 Then
test = intVal
ElseIf intVal = 0 And intVal < 3 Then
test = intVal * -1
Else
test = intVal
End If
End Function

"B LO" wrote:

I needed to know how or what easy way to create formulas. I wanted to to
create a cell that shows if I enter a number less than three it will show as
negitive and of coruse if it three or higher it stays in the positve?
--
Looking for help.