+ Reply to Thread
Results 1 to 3 of 3

Formula won't ignore cell

  1. #1
    Registered User
    Join Date
    07-28-2009
    Location
    Newcastle
    MS-Off Ver
    Excel 2003
    Posts
    38

    Formula won't ignore cell

    I've come across a weird problem with one of my formulas, and I've recreated it in the attached spreadsheet.

    I've got some data and a formula that uses it - D7.

    At times, some of the data may not be available - say, for example, I5 is empty. This then gives #DIV/0 errors in all forumulas that use it.

    I've put a trigger on my spreadsheet so that if the circumstances are such that any data is missing, there will be a "2" in D5. This is supposed to then remove the formula in D7.

    The result (D13) shouldn't now have an error code.

    The problem is, if there is a "2" in D5, D7 then comes up blank, but I still get a different answer than if I clear the contents of D7 by manually deleting the forumula.

    These aren't the actual formulas I'm using, I just put them in to show what I'm talking about.

    Hope this makes sense!
    Attached Files Attached Files
    Last edited by NBVC; 07-09-2010 at 09:51 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Formula won't ignore cell

    Should the result be "fail"?

    If so replace your D7 formula with:

    =IF(D5=2,0,AVERAGE(J5:J10)) You can custom format to hide 0 as: 0;-0;;@

    The reason is that a "" is not the same as a complete blank cell..

    When you are comparing with D7>D9, it sees the null as text.. but a blank cell as 0, which are different... text strings are greater than numbers, in the eyes of Excel....
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-28-2009
    Location
    Newcastle
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Formula won't ignore cell

    Thanks, I hadn't realised that excel sees a blank cell as 0, all sorted now

+ 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