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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top