ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Replace all negatives in a column with zero (https://www.excelbanter.com/new-users-excel/16503-replace-all-negatives-column-zero.html)

Laura@Gage

Replace all negatives in a column with zero
 
Hi,
I need to replace all negatives in a column with zero. I'm running into a problem because one, not all numbers in that column are negative, and two, I already have functions that have to stay in the cells. Is there anything that I can do with formatting or can I have more than one function in a cell...and if so, what function?
Thanks!!!

Ken Wright

Give us an example of the functions you have in the cells. The functions or
formulas from 3 consecutive cells should help us know if this is to be easy
or not.

Example, if your formula is simply able to be copied down, but produces
negative numbers, then n your first cell with a formula, replace
your_formula with

=MAX(0,your_formula) and then just copy down.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Laura@Gage" wrote in message
...

Hi,
I need to replace all negatives in a column with zero. I'm running
into a problem because one, not all numbers in that column are
negative, and two, I already have functions that have to stay in the
cells. Is there anything that I can do with formatting or can I have
more than one function in a cell...and if so, what function?
Thanks!!!


--
Laura@Gage




Max

One way might be to use a helper col,
then point all downstream calcs to it

If orig. col is col A, with data/formulas in row2 down

Put in B2: =MAX(A2,0)
Copy B2 down

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Laura@Gage" wrote in message
...

Hi,
I need to replace all negatives in a column with zero. I'm running
into a problem because one, not all numbers in that column are
negative, and two, I already have functions that have to stay in the
cells. Is there anything that I can do with formatting or can I have
more than one function in a cell...and if so, what function?
Thanks!!!


--
Laura@Gage





All times are GMT +1. The time now is 02:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com