Replace the minus value

  • Thread starter Thread starter Rajiv
  • Start date Start date
R

Rajiv

Hi freindz,

I am working in one sheet. There are some negative (minus) value in some
cell. I want to replace it with zero with the use of formula.

Kindly suggest me, how can it possible.

Regards,

Rajiv
 
If say A1 thru A1000 have both positive and negative values, then in an
unused column enter:

=IF(A1<0,0,A1) and copy down. Then copy the new column and
paste/special/values back onto column A.
 
"Replace it with zero with the use of formula" does not make sense.
You cannot use a formula in the same(!) cell in order to change that cell.
There is nothing wrong in using VBA code and if it is your first time - try
it.
You may also take a look here:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
------------------------------------------
Sub ReplaceNegativeByZero()
For Each CL In ActiveSheet.UsedRange
If CL < 0 Then CL.Value = 0
Next
End Sub
 
Back
Top