I would like to be able to use in my formula zero divided by zero (which is zero).  I need this in order for my P

I would like to expand briefly on my submitted question.  I developed a spread sheet to monitor profit and loss on stocks that I trade.  My P & L column currently displays the negative value of my purchase(s).  I created a formula that includes my exit price of the stock which is zero until I sell some shares.  I would like my P & L column to show a correct value and then of course total the column.  I was able to create a formula that is mathematically correct using a variable divided by itself to give me a correct display but Numbers wouldn't allow it because sometimes that variable is equal to zero until I sell some shares of the stock and then the sell price gets plugged in.  If that variable is any number besides zero then obviously the formula will be multiplying by one (1) and that will show me a correct value in my P & L column.  Any suggestions or ideas?  Please advise.  Thanks carjam.

0 / 0 is not defined.  It is NOT equal to zero.  it is a special case which you should avoid.  If you have questions about the details of dividing by zero refer to here:
http://en.wikipedia.org/wiki/Zero_divided_by_zero
you may want to perform the divide only if the dividend is not zero or maks the error using the function iferror()
something like:
=iferror(A1/B1, 0)
this will attempt to divide A1 by B1 and return the result.  if there is an error then the function will return zero

Similar Messages

Maybe you are looking for

  • EXISTS in INSERT Query

    Hi, I want to insert a record in a table if that value does not exists. Like select ip_address into ipadd from server_data where ip_address='100.100.100.100'; if ipaddress <> '' then insert into server_data values(.......); end if How to write a quer

  • Error while loading data into application

    I have created new application successfully. Loaded LCM backup successfully. Imported all the rules successfully. While loading data in plan1 through Essbase Administrator Services. i got this error: "Parallel dataload enabled: [1] block prepare thre

  • Black lines appear grey

    Hi. I have a newbie question regarding the appearance of figures in Illustrator. When I make objects such as lines and rectangles with black color, they appear grey and diffuse (especially for thin lines). I'm able to change the line color, but it's

  • Why does this keep giving a parse error when trying to use JavaHelp

    I'm trying to get JavaHelp to integrate into my application, but when I call the code below I get the following error; javax.help.HelpSetException: Could not parse Got an IOException (null) Parsing failed for nullthe error is occuring at the line ind

  • Why does Windows Vista tell me Firefox has stopped running when I close Firefox ?

    Ver 20.0.1 no problem with Windows 7.