Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Formatting negative numbers to equal zero

Is it possible to conditionally format a cell so that if it's formula equals
a number less than zero that it displays as zero?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 143
Default Formatting negative numbers to equal zero

Yes.

Let's say you gave the number 5 in cell A1 and the number 6 in cell B1.
Your formula is in cell C1, =A1-B1 with gives you -1. If you wrap that
formula in an If statement, you can force it to zero:
=IF(A1-B1<0,0,A1-B1)

You are simply saying that if the difference between A1 and B1 is less than
zero, evaluate as zero, otherwise give the positive difference.


--
Regards,

PJ
Please rate this post using the vote buttons if it was helpful.



"kjhxsh" wrote:

Is it possible to conditionally format a cell so that if it's formula equals
a number less than zero that it displays as zero?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default Formatting negative numbers to equal zero

Hi

You don't need conditional formatting.

Select the cell(s) and goto Format Cells Number Category: Custom
Type: Enter #0_),[Red]"0"

Hopes this helps

---
Per

"kjhxsh" skrev i meddelelsen
...
Is it possible to conditionally format a cell so that if it's formula
equals
a number less than zero that it displays as zero?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Formatting negative numbers to equal zero

Try this formula =MAX(0,your formula)

examples

rather than =A1-B1 or =A1*-(0.10/12)

try use =MAX(0,A1-B1) or =MAX(0,A1*-(0.10/12))

"kjhxsh" wrote:

Is it possible to conditionally format a cell so that if it's formula equals
a number less than zero that it displays as zero?

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 make negative numbers equal zero benny1 Excel Worksheet Functions 2 October 23rd 06 08:46 PM
HOW TO GET A SUM TO NOT EQUAL A NEGATIVE tee Excel Worksheet Functions 3 September 2nd 06 09:31 AM
Make a negative response to if question equal zero Ced Excel Discussion (Misc queries) 4 June 25th 06 01:51 AM
Quick formatting for negative numbers Mulepadre Excel Worksheet Functions 1 March 25th 06 03:09 AM
Formatting negative numbers in Excel Negative numbers in brackets Excel Discussion (Misc queries) 3 June 2nd 05 06:37 AM


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

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

About Us

"It's about Microsoft Excel"