Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Rounding Negative Numbers to Zero

I've been searching around and can't seem to figure out how to write a
formula that will round a negative number to 0 correctly. I used the
(MAX(0,A1) and it seemed to work from that cell but another cell pulls the
value from that cell and it was still using the negative number to calculate.

I need a formula that will round the negative number to Zero and then use
the Zero from that roundup when other cells are referring to it.

Does that make sense?

Need help!!

Thanks,
Robbie
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Rounding Negative Numbers to Zero

On Tue, 14 Jul 2009 13:26:02 -0700, Robbie
wrote:

I've been searching around and can't seem to figure out how to write a
formula that will round a negative number to 0 correctly. I used the
(MAX(0,A1) and it seemed to work from that cell but another cell pulls the
value from that cell and it was still using the negative number to calculate.

I need a formula that will round the negative number to Zero and then use
the Zero from that roundup when other cells are referring to it.

Does that make sense?

Need help!!

Thanks,
Robbie


A1: your number
B1: =max(0,a1)

Have your other formulas either refer to B1; or in those cells, substitute
max(0,a1) for a1
--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Rounding Negative Numbers to Zero



"Ron Rosenfeld" wrote:

On Tue, 14 Jul 2009 13:26:02 -0700, Robbie
wrote:

I've been searching around and can't seem to figure out how to write a
formula that will round a negative number to 0 correctly. I used the
(MAX(0,A1) and it seemed to work from that cell but another cell pulls the
value from that cell and it was still using the negative number to calculate.

I need a formula that will round the negative number to Zero and then use
the Zero from that roundup when other cells are referring to it.

Does that make sense?

Need help!!

Thanks,
Robbie


A1: your number
B1: =max(0,a1)

Have your other formulas either refer to B1; or in those cells, substitute
max(0,a1) for a1
--ron



That worked. Only problem I have now is that the negative number still
displays in A1 even though it is rounded to zero for purposes of calculation
in other cells that refer to it. I can't change the formatting because
sometimes the number won't be negative and we'll need to keep the formatting
in that case. It's not the end of the world, but would be nice to have it
fixed!

Thanks again for your help!
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Rounding Negative Numbers to Zero

Hi,

I don't understand why you can't change the formatting - seems to me that
the following custom format would do what you need:

$#,##0.00;\0;\0

--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Robbie" wrote:



"Ron Rosenfeld" wrote:

On Tue, 14 Jul 2009 13:26:02 -0700, Robbie
wrote:

I've been searching around and can't seem to figure out how to write a
formula that will round a negative number to 0 correctly. I used the
(MAX(0,A1) and it seemed to work from that cell but another cell pulls the
value from that cell and it was still using the negative number to calculate.

I need a formula that will round the negative number to Zero and then use
the Zero from that roundup when other cells are referring to it.

Does that make sense?

Need help!!

Thanks,
Robbie


A1: your number
B1: =max(0,a1)

Have your other formulas either refer to B1; or in those cells, substitute
max(0,a1) for a1
--ron



That worked. Only problem I have now is that the negative number still
displays in A1 even though it is rounded to zero for purposes of calculation
in other cells that refer to it. I can't change the formatting because
sometimes the number won't be negative and we'll need to keep the formatting
in that case. It's not the end of the world, but would be nice to have it
fixed!

Thanks again for your help!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Rounding Negative Numbers to Zero

On Tue, 14 Jul 2009 14:55:01 -0700, Robbie
wrote:

That worked. Only problem I have now is that the negative number still
displays in A1 even though it is rounded to zero for purposes of calculation
in other cells that refer to it. I can't change the formatting because
sometimes the number won't be negative and we'll need to keep the formatting
in that case. It's not the end of the world, but would be nice to have it
fixed!

Thanks again for your help!


You could use a custom format to display all kinds of things in place of the
negative number.

For example:

General;[Red]"negative value rounded to zero";General

--ron
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
Rounding to the nearest 25 including negative numbers?? Bob Excel Discussion (Misc queries) 3 May 10th 09 03:19 PM
Rounding to the nearest 25 including negative numbers?? Bob Excel Discussion (Misc queries) 4 May 9th 09 05:56 PM
Excel 2002 : Convert Positive Numbers to Negative Numbers ? Mr. Low Excel Discussion (Misc queries) 2 November 6th 06 03:30 PM
Set negative numbers to zero. Do not calculate with negative valu Excel Headache Excel Discussion (Misc queries) 4 September 14th 06 08:56 PM
Rounding formulas for negative numbers Pat Excel Worksheet Functions 3 August 31st 06 06:43 PM


All times are GMT +1. The time now is 11:51 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"