+ Reply to Thread
Results 1 to 8 of 8

Getting Rid of Error Message

  1. #1
    Registered User
    Join Date
    10-25-2004
    Posts
    88

    Getting Rid of Error Message

    I have a "simple" logarithmic function: - log(1-$a1)/log(1+$i$1) where the $a colomn varies between 0 and 0.9999 and $i$1 is always positive. A xy chart is drawn for this function with a logarithmic Y-axis.

    Displaying the chart always provokes an arror message: (something like) Negative or null values cannot be correctly drawn in logarithmic charts.....

    For as far as my algebaic knowledge goes, this function (within the data range) never gets negative. Why the error message? And more inmportantly, how to get rid of it?

    Turning DisplayAlerts off is NOT an option, as the Workbook that contains that function can display valid messages.

  2. #2
    Jon Peltier
    Guest

    Re: Getting Rid of Error Message

    Are there any error bars which might lead to a negative number?

    - Jon
    -------
    Jon Peltier, Microsoft Excel MVP
    Peltier Technical Services
    Tutorials and Custom Solutions
    http://PeltierTech.com/
    _______


    "rvExcelNewTip" <rvExcelNewTip.21b9am_1136715001.478@excelforum-nospam.com>
    wrote in message
    news:rvExcelNewTip.21b9am_1136715001.478@excelforum-nospam.com...
    >
    > I have a "simple" logarithmic function: - log(1-$a1)/log(1+$i$1) where
    > the $a colomn varies between 0 and 0.9999 and $i$1 is always positive.
    > A xy chart is drawn for this function with a logarithmic Y-axis.
    >
    > Displaying the chart always provokes an arror message: (something like)
    > -Negative or null values cannot be correctly drawn in logarithmic
    > charts....-.
    >
    > For as far as my algebaic knowledge goes, this function (within the
    > data range) never gets negative. Why the error message? And more
    > inmportantly, how to get rid of it?
    >
    > Turning DisplayAlerts off is NOT an option, as the Workbook that
    > contains that function can display valid messages.
    >
    >
    > --
    > rvExcelNewTip
    > ------------------------------------------------------------------------
    > rvExcelNewTip's Profile:
    > http://www.excelforum.com/member.php...o&userid=15668
    > View this thread: http://www.excelforum.com/showthread...hreadid=499144
    >




  3. #3
    Registered User
    Join Date
    10-25-2004
    Posts
    88
    The error shows even if the chart is drawn without any error bars. As soon as you switch the scale of the Y-axis to logarithmic, you get it.

    PS: I do have a problem with error bars in a logarithmic plot in a related problem: http://www.excelforum.com/showthread...08#post1447008

  4. #4
    Jon Peltier
    Guest

    Re: Getting Rid of Error Message

    Any blank cells in the source data range?

    - Jon


    "rvExcelNewTip" <rvExcelNewTip.21cx8y_1136792701.0076@excelforum-nospam.com>
    wrote in message
    news:rvExcelNewTip.21cx8y_1136792701.0076@excelforum-nospam.com...
    >
    > The error shows even if the chart is drawn without any error bars. As
    > soon as you switch the scale of the Y-axis to logarithmic, you get it.
    >
    > PS: I do have a problem with error bars in a logarithmic plot in a
    > related problem:
    > http://www.excelforum.com//showthrea...5&goto=newpost
    >
    >
    >
    > --
    > rvExcelNewTip
    > ------------------------------------------------------------------------
    > rvExcelNewTip's Profile:
    > http://www.excelforum.com/member.php...o&userid=15668
    > View this thread: http://www.excelforum.com/showthread...hreadid=499144
    >




  5. #5
    Registered User
    Join Date
    10-25-2004
    Posts
    88
    No blank cells in the source data range!
    Excel version 2003

    I should perhaps add that the offending error message suggests the following advise:

    - Enter only values that are positive in the cells used by the chart
    - Unselect the logarithmic scale

    I also changed the formula to ABS(LOG(1-$A1)/LOG(1+$I$1)), thereby eliminating the leading minus sign. Same result.

    Apparently, Excel is suspicious of the ABS(LOG(1-$A1)) part of the formula. If you substitute this test formula for the original one, the message persists.

    The 1-$A1 part could theoretically result in a negative argument for the LOG function, but the actual data don't as the values in the $A column are between 0 and 0.999

    In my opinion the resulting message is misplaced, not to say an error (or should I say bug in this case?)

    Thanks Jon for your continuing support.

  6. #6
    Jon Peltier
    Guest

    Re: Getting Rid of Error Message

    > -ABS(LOG(1-$A1)/LOG(1+$I$1))-

    I'm confused by your apparent use of hyphen/minus sign for quotes. Do you
    mean this?

    "ABS(LOG(1-$A1)/LOG(1+$I$1))"

    Since $A1 is always less than 1, 1-$A1 is always positive, but log(1-$A1) is
    either zero (if $A1 is 0) or negative (if $A1>0 and <0.999). If you're
    plotting this function on a log scale, Excel will reject it. If you're
    plotting ABS(this function) on the log scale, and there's an instance where
    $A1=0, then ABS(the function)=0 and Excel will again reject it.

    - Jon
    -------
    Jon Peltier, Microsoft Excel MVP
    Peltier Technical Services
    Tutorials and Custom Solutions
    http://PeltierTech.com/
    _______


    "rvExcelNewTip" <rvExcelNewTip.21gony_1136968201.6344@excelforum-nospam.com>
    wrote in message
    news:rvExcelNewTip.21gony_1136968201.6344@excelforum-nospam.com...
    >
    > No blank cells in the source data range!
    > Excel version 2003
    >
    > I should perhaps add that the offending error message suggests the
    > following advise:
    >
    > - Enter only values that are positive in the cells used by the chart
    > - Unselect the logarithmic scale
    >
    > I also changed the formula to -ABS(LOG(1-$A1)/LOG(1+$I$1))-, thereby
    > eliminating the leading minus sign. Same result.
    >
    > Apparently, Excel is suspicious of the -ABS(LOG(1-$A1))- part of the
    > formula. If you substitute this test formula for the original one, the
    > message persists.
    >
    > The -1-$A1- part could theoretically result in a negative argument for
    > the -LOG- function, but the actual data don't as the values in the -$A-
    > column are between 0 and 0.999
    >
    > In my opinion the resulting message is misplaced, not to say an error
    > (or should I say bug in this case?)
    >
    > Thanks Jon for your continuing support.
    >
    >
    > --
    > rvExcelNewTip
    > ------------------------------------------------------------------------
    > rvExcelNewTip's Profile:
    > http://www.excelforum.com/member.php...o&userid=15668
    > View this thread: http://www.excelforum.com/showthread...hreadid=499144
    >




  7. #7
    Registered User
    Join Date
    10-25-2004
    Posts
    88

    Thumbs up

    Quote Originally Posted by Jon Peltier
    > -ABS(LOG(1-$A1)/LOG(1+$I$1))-
    I'm confused by your apparent use of hyphen/minus sign for quotes. Do you
    mean this?
    "ABS(LOG(1-$A1)/LOG(1+$I$1))"
    >
    Jon,

    It's my turn to be confused In my view of the forum message the hyphens don't show up. I used (and hopefully this comes through unscathed) either -LOG(1-$A$1)/LOG(1+$I$1) or ABS(LOG(1-$A$1)/LOG(1+$I$1))

    Quote Originally Posted by Jon Peltier
    >
    Since $A1 is always less than 1, 1-$A1 is always positive, but log(1-$A1) is
    either zero (if $A1 is 0) or negative (if $A1>0 and <0.999). If you're
    plotting this function on a log scale, Excel will reject it. If you're
    plotting ABS(this function) on the log scale, and there's an instance where
    $A1=0, then ABS(the function)=0 and Excel will again reject it.
    >
    You hit the nail on the head: I should start the $A range at a value other than zero (e.g. 0.001) and then the message disappears. Excel, after all, was right! Many Thanks
    Last edited by rvExcelNewTip; 01-13-2006 at 04:08 AM.

  8. #8
    Jon Peltier
    Guest

    Re: Getting Rid of Error Message

    You should be using plain text in these forums, if you're not already. The
    two bits you included in your first para were:

    --LOG(1-$A$1)/LOG(1+$I$1)- [two leading hyphens and one trailing]
    -ABS(LOG(1-$A$1)/LOG(1+$I$1))- [single leading and trailing hyphens]

    - Jon
    -------
    Jon Peltier, Microsoft Excel MVP
    Peltier Technical Services
    Tutorials and Custom Solutions
    http://PeltierTech.com/
    _______


    "rvExcelNewTip" <rvExcelNewTip.21ik9a_1137055801.4814@excelforum-nospam.com>
    wrote in message
    news:rvExcelNewTip.21ik9a_1137055801.4814@excelforum-nospam.com...
    >
    > Jon Peltier Wrote:
    >> > -ABS(LOG(1-$A1)/LOG(1+$I$1))-

    >> I'm confused by your apparent use of hyphen/minus sign for quotes. Do
    >> you
    >> mean this?
    >> "ABS(LOG(1-$A1)/LOG(1+$I$1))"
    >> >

    >
    > Jon,
    >
    > It's my turn to be confused In my view of the forum message
    > the hyphens don't show up. I used (and hopefully this comes through
    > unscattered) either --LOG(1-$A$1)/LOG(1+$I$1)- or
    > -ABS(LOG(1-$A$1)/LOG(1+$I$1))-
    >
    > Jon Peltier Wrote:
    >> >

    >> Since $A1 is always less than 1, 1-$A1 is always positive, but
    >> log(1-$A1) is
    >> either zero (if $A1 is 0) or negative (if $A1>0 and <0.999). If you're
    >> plotting this function on a log scale, Excel will reject it. If you're
    >> plotting ABS(this function) on the log scale, and there's an instance
    >> where
    >> $A1=0, then ABS(the function)=0 and Excel will again reject it.
    >> >

    >
    > You hit the nail on the head: I should start the $A range at a value
    > other than zero (e.g. 0.001) and then the message disappears. Excel,
    > after all, was right! Many Thanks
    >
    >
    > --
    > rvExcelNewTip




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1