Hi Pat,
Could you just run this macro at the end of your code?
Sub ClearNegatives()
Dim iLastRow As Long
Dim i As Long
iLastRow = Cells(Rows.Count,"A").End(xlUp).Row
For i = 1 To iLastRow
If IsNumeric(Cells(i,"A").Value) Then
If Cells(i,"A").Value < 0
Cells(i,"A").Value = 0
End If
End If
Next i
End Sub
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Pat" wrote in message
...
Hi Bob,
Ok, say for example:
A1 = -6
A4 = -21
A10 = -8
The above are the result of a calculation preformed with use of code. Once
the code completes I need some other way of returning A1, A4 & A10 to 0
I could custom filter column A to display any cells with a negative value
then just manually enter 0.
However I prefer to use another way, if that is possible.
Pat
"Bob Phillips" wrote in message
...
I for one do not understand.
What exactly do you mean by '... after it displays a minus number result
in
a cell...' and '... minus result is the result of code being run and it
can
result in more than one cell in a range eg A1:A10...'?
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Pat" wrote in message
...
Is it possible to return a cell to zero after it displays a minus
number
result in a cell. ?
The minus result is the result of code being run and it can result in
more
than one cell in a range eg A1:A10
I do not want a formula to be used.
Any pointers on this will be most appreciated.
Pat
|