Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I change my negative values to zeros in Excel?

I need to convert data from mg/L to mg/kg, but before I can do that I need to
get rid of my negative values. How do I change, for example, -0.005 to zero
without manually doing so (I have hundreds of negative values and do not have
the time or patience to do so)?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 449
Default How do I change my negative values to zeros in Excel?

Hi

Helper column with formula like
=MAX(A1,0)
Fill down, then replace formula with values.

HTH. Best wishes Harald

"N_Davis" wrote in message
...
I need to convert data from mg/L to mg/kg, but before I can do that I need
to
get rid of my negative values. How do I change, for example, -0.005 to
zero
without manually doing so (I have hundreds of negative values and do not
have
the time or patience to do so)?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How do I change my negative values to zeros in Excel?

Just the thing for those with no time or patience............

Sub foo()
For Each cell In ActiveSheet.UsedRange
If cell.Value < 0 Then
cell.Value = 0
End If
Next
End Sub


Gord Dibben MS Excel MVP

On Thu, 27 Sep 2007 10:57:02 -0700, N_Davis
wrote:

I need to convert data from mg/L to mg/kg, but before I can do that I need to
get rid of my negative values. How do I change, for example, -0.005 to zero
without manually doing so (I have hundreds of negative values and do not have
the time or patience to do so)?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I change the display of negative values to parentheses? accounts.payable New Users to Excel 6 December 10th 07 05:28 PM
How can I display negative numbers as zeros? mvance4 Excel Discussion (Misc queries) 3 August 8th 07 06:58 PM
is there a function to change negative values to zero? B-manninja Excel Worksheet Functions 2 April 12th 07 11:10 PM
How can I change all negative values in a column to = 0? dbsavoy Excel Worksheet Functions 3 August 21st 06 08:14 PM
Unwanted Zeros in Excel Chart Displayed Values Daniel Compton Excel Discussion (Misc queries) 4 April 25th 06 04:07 PM


All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"