+ Reply to Thread
Results 1 to 5 of 5

Multiple criteria using IIF

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Multiple criteria using IIF

    Hello everyone
    I tried to use IIF to include four criteria in one line

    Please Login or Register  to view this content.
    I got an error at this line (Argument not optional) .. How to adapt this using IIF?
    Please don't post solutions using If or Select Case ...
    My issue with IIF statement ..
    Is it possible to adapt IIF for mutliple criteria ..?
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Multiple criteria using IIF

    Its not to do with the IIF, the error is that you dont have an alternative ending if its not Sheet 4, add another comma and then what you want to return if its none of the expected sheets.
    If someone has helped you then please add to their Reputation

  3. #3
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Multiple criteria using IIF

    Thank you very much
    You are great .. That's solved the problem
    But what if I don't need to assign value for alternative ending..In my code the criteria will be just four no more

  4. #4
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Multiple criteria using IIF

    if you're saying that its not possible to have anything other than those 4 sheet names then you can put anything there it will never hit that point however it may be wise to put something that stands out "#ERROR" or something just to highlight if something unexpected happened.

    On that logic though you dont need the 4th IIF, youre basically saying at that stage it has to be Sheet4 and therefore you can remove that IIF statement and add in the ,5 as the FALSE on the sheet3 question
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Multiple criteria using IIF

    Thank you very much for great and awesome help
    Best regards

+ 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. Replies: 9
    Last Post: 07-23-2015, 01:21 PM
  2. Replies: 2
    Last Post: 05-26-2015, 07:29 PM
  3. [SOLVED] countifs statement with multiple criteria for multiple criteria ranges
    By mcdermott2 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-07-2015, 11:48 AM
  4. [SOLVED] UDF for sum of multiple criteria in multiple columns and single criteria in multiple colum
    By Ganesh7299 in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 11-22-2013, 04:26 AM
  5. Count statement wtih multiple criteria only showing results for one criteria
    By uhlabomber in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-17-2013, 02:47 PM
  6. [SOLVED] create drop down box to select multiple criteria and link macro to each criteria
    By anand_erin in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 11-03-2012, 06:35 PM
  7. Replies: 2
    Last Post: 10-05-2011, 12:43 PM

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