+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : Huge if statement, can't locate the issue

  1. #1
    Registered User
    Join Date
    08-03-2011
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    1

    Huge if statement, can't locate the issue

    Howdy,

    I wrote a huge if statement to work with a large chart. I've gone over it multiple times, but each time I hit enter, Excel tells me there's a problem with the statement and highlights the whole thing. Can someone take a look below and tell me if you see an issue?

    Thanks!
    Please Login or Register  to view this content.
    Edit:
    OK, I found a couple of errors and I now have the following:

    Please Login or Register  to view this content.
    Excel will accept this as a formula, but now returns #VALUE! instead of the NB or DT results in the formula. It sounds like I have text and math mixed here, but as far as I can tell I have parenthesis and apostrophes in the right places. Any help would be appreciated.
    Last edited by wilfite; 08-03-2011 at 01:10 PM.

  2. #2
    Valued Forum Contributor Miraun's Avatar
    Join Date
    04-03-2009
    Location
    New England
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    554

    Re: Huge if statement, can't locate the issue

    Hey Wilfite;

    There appear to be potentially a few problems in there. I can highlight only a couple, and will give you a method to further debug on your own.

    First and foremost, the OR operator is used to define full string that independently result in True/False results.

    At the very beginning of your if statement, you use
    =if C5=or(
    Instead, you should use:
    If(Or(C5="Desktop",C5="Integrated Desktop),

    Now... stepping back for a minute, when you receive the #VALUE error, you get the wonderful opportunity to debug! If you click on the cell, you'll get the little [!] Indicator. Clicking on that, you have the option to show calculation steps. This will highlight the errors that caused the #VALUE problem... and it can also show you a breakdown of the calculations and their results for each component of the statement.
    Going for Guru! Click the Star to the bottom left of this post if I helped!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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