Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Divide two cells and if the number is negative display is as zero

I have an excell spread sheet and i am dividing two cells. Most of the
numbers are positve but some of the numbers are negative. I want to put a
formula in to all the cells that will divide the two cells and give me the
answer to one digit but if the number is negative i want it to display as 0.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Divide two cells and if the number is negative display is as zero

Maybe something like this...

=MAX(0,ROUND(A1/A2,1))

--
Biff
Microsoft Excel MVP


"mike" wrote in message
...
I have an excell spread sheet and i am dividing two cells. Most of the
numbers are positve but some of the numbers are negative. I want to put a
formula in to all the cells that will divide the two cells and give me the
answer to one digit but if the number is negative i want it to display as
0.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,510
Default Divide two cells and if the number is negative display is as zero

Hi Mike,

Following assumes that A1 is divided by B1

=IF(A1/B1<0,0,A1/B1)

However, if you have any zeros in column B then you will get #DIV/0! error
so you might want to expand the formula and put "" in lieu of the error.
=IF(ISERROR(A1/B1),"",IF(A1/B1<0,0,A1/B1))

If you want zero instead of "" if dividing by zero then replace the "" with
zero.
=IF(ISERROR(A1/B1),0,IF(A1/B1<0,0,A1/B1))


--
Regards,

OssieMac


"mike" wrote:

I have an excell spread sheet and i am dividing two cells. Most of the
numbers are positve but some of the numbers are negative. I want to put a
formula in to all the cells that will divide the two cells and give me the
answer to one digit but if the number is negative i want it to display as 0.

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
Negative Number Display -- need Brackets Rinke Gill Excel Discussion (Misc queries) 7 August 22nd 08 10:18 PM
Divide a range of cells by a number Kate Excel Discussion (Misc queries) 3 May 3rd 08 06:36 PM
display negative number as zero Sue Excel Discussion (Misc queries) 3 January 18th 07 04:13 AM
how do you divide the average of a number into 3 different cells. Shaun New Users to Excel 2 July 25th 06 10:08 PM
How do I change the display of a negative number to just read 0? [email protected] Excel Discussion (Misc queries) 2 April 18th 05 11:03 AM


All times are GMT +1. The time now is 08:28 AM.

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"