+ Reply to Thread
Results 1 to 6 of 6

IFS to IF

  1. #1
    Registered User
    Join Date
    07-05-2017
    Location
    UK
    MS-Off Ver
    16
    Posts
    2

    IFS to IF

    Hi - Excel newby making a first post here. I need to convert the following IFS function to an IF. I keep getting a message saying that I have too many arguments but can't work out why....

    The original IFS:

    =IFS(S$12<$J13, "a", S$12>$K13, "a", AND(S$12>=$O13, S$12>=$Q13), " ", AND(S$12>=$N13, S$12>$Q13), " ", AND(S$12>=$L13, S$12>=$Q13), " ", S$12>=$O13, "d", S$12>=$N13, "c", S$12>=$L13, "b", TRUE, "e")

    My best guess at the IF:

    =IF(S$12<$J13, "a", IF(S$12>$K13, "a", IF(AND(S$12>=$O13, S$12>=$Q13), " ", IF(AND(S$12>=$N13, S$12>$Q13), " ", IF(AND(S$12>=$L13, S$12>=$Q13), " ", IF(S$12>=$O13, "d", IF(S$12>=$N13, "c", IF(S$12>=$L13, "b", TRUE, "e"))))))))

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: IFS to IF

    Hi, welcome to the forum

    Total guess but...
    =IF(and(S$12<$J13, S$12>$K13), "a",if(AND(S$12>=$O13,S$12>=$N13, S$12>=$L13), " ", if(S$12>=$O13, "d", S$12>=$N13, "c", S$12>=$L13, "b", TRUE, "e")

    or not. You have duplicate and conflicting tests in there
    S$12<$J13,"a"
    S$12>$K13, "a"
    S$12>=$O13," "
    S$12>=$N13," "
    S$12>=$L13, " ",
    S$12>=$O13, "d"
    S$12>=$N13, "c"
    S$12>=$L13, "b"
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    07-05-2017
    Location
    UK
    MS-Off Ver
    16
    Posts
    2

    Re: IFS to IF

    Thanks for the reply!

    Still the same 'too many arguments' response with that formula

    I made the IFS function for some conditional formatting of a project plan - duplicates/conflicting tests don't seem to be an issue with IFS because only the first true value is taken, otherwise the formula works its way down to the final false..

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,666

    Re: IFS to IF

    Looking at the IF based formula in post #1 there are too many arguments to the very last If function ...IF(S$12>=$L13, "b", TRUE, "e")
    S$12>=$L13 is the logical_test
    "b" is the value_if_true
    TRUE is the value_if_false
    "e" is the argument that triggers the 'too may' error.
    I am not sure what the intent of that part of the formula is, so I can't suggest a correction.
    Perhaps if you tell us the logic of that particular part of the formula, we can figure out the syntax.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: IFS to IF

    Hope it help you,

    =IF(S$12=TRUE,"e",IF(S$12>$Q13,"",IF(S$12>=$Q13,"",IF(OR(S$12>$J13,S$12<$K13),"a",IF(S$12>=L13,"b",IF(S$12>=$N13,"c",IF(S$12>=O13,"d","Nothing Match")))))))

    it search from E > " " > A > B > C > D , and show Nothing Match if all compare is false.
    Hope you can learn every time you visit here.

    If you still confuse on how it work, kindly ask or go to
    i) Formula - Formula (Ribbon) > Formula Auditing (Section) > Evaluate Formula > Evaluate; or
    ii) VBA/Code - Click F8 to see how it work step by step.

    It it take care of your question, Please:
    Mark tread as [Solved] [Thread Tools->Mark thread as Solved]
    ;and
    Click *Add Reputation to thank anyone solved your question.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: IFS to IF

    Quote Originally Posted by gusl91 View Post
    Thanks for the reply!

    Still the same 'too many arguments' response with that formula

    I made the IFS function for some conditional formatting of a project plan - duplicates/conflicting tests don't seem to be an issue with IFS because only the first true value is taken, otherwise the formula works its way down to the final false..
    That still doesnt resolve the conflicting rules there? All 3 "sets" of rules in my bolded section conflict

+ 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