Create a formula

B

B LO

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?
 
R

RagDyer

This formula will display the results you want of a cell *other* then the
cell that contains this formula:

=A1*(-(A1<3)+(A1>=3))

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================
 
D

Dan

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
 
Top