+ Reply to Thread
Results 1 to 6 of 6

How can IIF Statement bring false statement?

  1. #1
    Valued Forum Contributor
    Join Date
    12-22-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003 & Excel/Access 2007
    Posts
    438

    How can IIF Statement bring false statement?

    I have this statement (below) that works if the condition is true but if its false its not returning what I would like for it to.

    Please Login or Register  to view this content.

    Not sure what I missed.
    Last edited by jgomez; 07-19-2013 at 05:20 PM.

  2. #2
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: How can IIF Statement bring false statement?

    You've exceeded the allowable limit for nested IIF statements (7).
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How can IIF Statement bring false statement?

    Try using a Switch statement within an Iif statement.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  4. #4
    Valued Forum Contributor
    Join Date
    12-22-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003 & Excel/Access 2007
    Posts
    438

    Re: How can IIF Statement bring false statement?

    Learn something everday... thank you both. I'm not familiar w/the switch function so i keep getting errors. I will keep trying.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: How can IIF Statement bring false statement?

    What you could do is set up a small table with 2 fields STE CODE and Years.

    The STE CODE field would be populated by the various values "21", "42" etc and the Years field with the corresponding no of years to add.

    Then you could use DLookUp to retrieve the no of years to use in the DateAdd.

    I've got a feeling that might not be good practice but it should work.

    It would also be handy if the years ever changed - you could just change them in the table without having to change the expression.

  6. #6
    Valued Forum Contributor
    Join Date
    12-22-2010
    Location
    Texas
    MS-Off Ver
    Excel 2003 & Excel/Access 2007
    Posts
    438

    Re: How can IIF Statement bring false statement?

    That will work! Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. If statement, answer is false, hide false.
    By Mel B in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-07-2013, 06:36 PM
  2. [SOLVED] Avoid nested IF statement and bring columns together
    By deanstein in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-23-2012, 02:35 AM
  3. If statement with a range and true/false statement
    By aarleblanc in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-20-2012, 06:34 PM
  4. If Statement - False
    By Foxcan in forum Excel General
    Replies: 1
    Last Post: 06-23-2009, 03:16 PM
  5. If False statement
    By iangreen in forum Excel General
    Replies: 9
    Last Post: 06-19-2007, 08:18 AM

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