Excel saying too many arguments for IF/AND/MONTH function












1














I need it to produce orders that are in Canada or Mexico, over $1,000, and in the month of July. The formula I am trying to use is:



=IF(OR(A2="Canada","Mexico", IF(C2>1000, "Ship by Air", IF(MONTH(B2=7, "Ship by Air", "Ship by Ground")))


I don't know how else to write it with all of that information.










share|improve this question





























    1














    I need it to produce orders that are in Canada or Mexico, over $1,000, and in the month of July. The formula I am trying to use is:



    =IF(OR(A2="Canada","Mexico", IF(C2>1000, "Ship by Air", IF(MONTH(B2=7, "Ship by Air", "Ship by Ground")))


    I don't know how else to write it with all of that information.










    share|improve this question



























      1












      1








      1







      I need it to produce orders that are in Canada or Mexico, over $1,000, and in the month of July. The formula I am trying to use is:



      =IF(OR(A2="Canada","Mexico", IF(C2>1000, "Ship by Air", IF(MONTH(B2=7, "Ship by Air", "Ship by Ground")))


      I don't know how else to write it with all of that information.










      share|improve this question















      I need it to produce orders that are in Canada or Mexico, over $1,000, and in the month of July. The formula I am trying to use is:



      =IF(OR(A2="Canada","Mexico", IF(C2>1000, "Ship by Air", IF(MONTH(B2=7, "Ship by Air", "Ship by Ground")))


      I don't know how else to write it with all of that information.







      microsoft-excel worksheet-function






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 10 at 23:33









      fixer1234

      17.8k144581




      17.8k144581










      asked Dec 10 at 23:24









      Anna

      61




      61






















          3 Answers
          3






          active

          oldest

          votes


















          3














          OR needs each part to be its own Boolean expression:




          OR(A2="Canada","Mexico"




          Should be:



          OR(A2="Canada",A2="Mexico")


          OR



          OR(A2={"Canada","Mexico"})


          And




          MONTH(B2




          is missing the )



          So:



          =IF(OR(A2={"Canada","Mexico"}), IF(C2>1000, "Ship by Air", IF(MONTH(B2)=7, "Ship by Air", "Ship by Ground")))


          Also you are missing the FALSE on the outer IF, which may be what you want, but I tend to add it so my formulas are more readable:



          =IF(OR(A2={"Canada","Mexico"}), IF(C2>1000, "Ship by Air", IF(MONTH(B2)=7, "Ship by Air", "Ship by Ground")),FALSE)


          But we can combine the inner two as the output is the same on the true:



          =IF(OR(A2={"Canada","Mexico"}), IF(OR(C2>1000, MONTH(B2)=7), "Ship by Air", "Ship by Ground"),FALSE)




          Edit: this will return Ship by Air if any of the following are TRUE:




          • A2 equals "Canada" or "Mexico"

          • C2 > 1000

          • The Month of B2 is July


          :



          =IF(OR(A2={"Canada","Mexico"},C2>1000, MONTH(B2)=7), "Ship by Air", "Ship by Ground")




          Edit2: this will return Ship by Air if All of the following are TRUE:




          • A2 equals "Canada" or "Mexico"

          • C2 > 1000

          • The Month of B2 is July


          :



          =IF(AND(OR(A2={"Canada","Mexico"}),C2>1000, MONTH(B2)=7), "Ship by Air", "Ship by Ground")





          share|improve this answer































            2














            You've got a good start; your formula is "pseudo-code" for what you want to accomplish. You just need to structure it for Excel.



            The first problem is that the factors used by functions need to be enclosed in parentheses so Excel knows where they start and end. Your first OR doesn't have a close parenthesis; the same with the MONTH function.



            The second problem is that the OR needs to contain a choice of complete conditions. Excel doesn't handle comparisons to a list, at least in a non-array format like you're using.



            Also, the first IF doesn't contain a result for what to show if the OR is false, so you probably want to add that.



            So the formula should look like:



            =IF(OR(A2="Canada",A2="Mexico"), IF(C2>1000, "Ship by Air", IF(MONTH(B2)=7, "Ship by Air", "Ship by Ground")),"Not Canada or Mexico")





            share|improve this answer























            • Okay, that one worked for the most part, however the orders from USA are coming up as false rather than "ship by ground" for some reason.
              – Anna
              Dec 10 at 23:57










            • @Anna so what you are saying is if A2 is canada or Mexico or c2>1000 or the month in B2 is July, if any of those are true then ship by air?
              – Scott Craner
              Dec 10 at 23:59










            • @Anna, yeah, I had spotted the problem with no false result for the OR, then forgot why I included it in the answer and deleted it. Need more coffee. :-) I added that back in. You can change that last result to whatever you need (even another nested IF if the result could be something other than USA).
              – fixer1234
              Dec 11 at 0:00










            • That one worked! Thank you!
              – Anna
              Dec 11 at 0:04










            • @Anna, Scott raises a good point. You've got some complex rules for when to ship by what method. The safe bet would be to expand the question with the complete set of rules for what you want to do (in words or a table). Then we can verify that the Excel logic is actually implementing what you want.
              – fixer1234
              Dec 11 at 0:04





















            0














            Count the brackets: You have five opening brackets and three closing brackets. But the counts have to match.



            You can see the problem with correct indenting of the expression:



            =IF(
            OR(
            A2="Canada","Mexico",
            IF(
            C2>1000, "Ship by Air",
            IF(
            MONTH(
            B2=7, "Ship by Air", "Ship by Ground"
            )
            )
            )
            // ---------------- Here your expression ends
            ) // missing
            ) // missing


            I marked the two missing closing brackets. Which expressions your want to close with ) depends on the logic you want to implement.






            share|improve this answer





















            • So I just need to add more closing parentheses? I just tried that, so now there are 5 opening and 5 ending, but it is giving me the same error message.
              – Anna
              Dec 10 at 23:43










            • A quick glance at the Office documentation shows that the MONTH(...) function takes one argument. You provided three :-/ So remove =7, "Ship by Air", "Ship by Ground" and you should be closer to a working expression. Remember to also check the IF and OR clauses this way, because it looks like the second IF clause is also wrong, because it seems to need three arguments. See IF clause.
              – zx485
              Dec 10 at 23:47













            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1382470%2fexcel-saying-too-many-arguments-for-if-and-month-function%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            OR needs each part to be its own Boolean expression:




            OR(A2="Canada","Mexico"




            Should be:



            OR(A2="Canada",A2="Mexico")


            OR



            OR(A2={"Canada","Mexico"})


            And




            MONTH(B2




            is missing the )



            So:



            =IF(OR(A2={"Canada","Mexico"}), IF(C2>1000, "Ship by Air", IF(MONTH(B2)=7, "Ship by Air", "Ship by Ground")))


            Also you are missing the FALSE on the outer IF, which may be what you want, but I tend to add it so my formulas are more readable:



            =IF(OR(A2={"Canada","Mexico"}), IF(C2>1000, "Ship by Air", IF(MONTH(B2)=7, "Ship by Air", "Ship by Ground")),FALSE)


            But we can combine the inner two as the output is the same on the true:



            =IF(OR(A2={"Canada","Mexico"}), IF(OR(C2>1000, MONTH(B2)=7), "Ship by Air", "Ship by Ground"),FALSE)




            Edit: this will return Ship by Air if any of the following are TRUE:




            • A2 equals "Canada" or "Mexico"

            • C2 > 1000

            • The Month of B2 is July


            :



            =IF(OR(A2={"Canada","Mexico"},C2>1000, MONTH(B2)=7), "Ship by Air", "Ship by Ground")




            Edit2: this will return Ship by Air if All of the following are TRUE:




            • A2 equals "Canada" or "Mexico"

            • C2 > 1000

            • The Month of B2 is July


            :



            =IF(AND(OR(A2={"Canada","Mexico"}),C2>1000, MONTH(B2)=7), "Ship by Air", "Ship by Ground")





            share|improve this answer




























              3














              OR needs each part to be its own Boolean expression:




              OR(A2="Canada","Mexico"




              Should be:



              OR(A2="Canada",A2="Mexico")


              OR



              OR(A2={"Canada","Mexico"})


              And




              MONTH(B2




              is missing the )



              So:



              =IF(OR(A2={"Canada","Mexico"}), IF(C2>1000, "Ship by Air", IF(MONTH(B2)=7, "Ship by Air", "Ship by Ground")))


              Also you are missing the FALSE on the outer IF, which may be what you want, but I tend to add it so my formulas are more readable:



              =IF(OR(A2={"Canada","Mexico"}), IF(C2>1000, "Ship by Air", IF(MONTH(B2)=7, "Ship by Air", "Ship by Ground")),FALSE)


              But we can combine the inner two as the output is the same on the true:



              =IF(OR(A2={"Canada","Mexico"}), IF(OR(C2>1000, MONTH(B2)=7), "Ship by Air", "Ship by Ground"),FALSE)




              Edit: this will return Ship by Air if any of the following are TRUE:




              • A2 equals "Canada" or "Mexico"

              • C2 > 1000

              • The Month of B2 is July


              :



              =IF(OR(A2={"Canada","Mexico"},C2>1000, MONTH(B2)=7), "Ship by Air", "Ship by Ground")




              Edit2: this will return Ship by Air if All of the following are TRUE:




              • A2 equals "Canada" or "Mexico"

              • C2 > 1000

              • The Month of B2 is July


              :



              =IF(AND(OR(A2={"Canada","Mexico"}),C2>1000, MONTH(B2)=7), "Ship by Air", "Ship by Ground")





              share|improve this answer


























                3












                3








                3






                OR needs each part to be its own Boolean expression:




                OR(A2="Canada","Mexico"




                Should be:



                OR(A2="Canada",A2="Mexico")


                OR



                OR(A2={"Canada","Mexico"})


                And




                MONTH(B2




                is missing the )



                So:



                =IF(OR(A2={"Canada","Mexico"}), IF(C2>1000, "Ship by Air", IF(MONTH(B2)=7, "Ship by Air", "Ship by Ground")))


                Also you are missing the FALSE on the outer IF, which may be what you want, but I tend to add it so my formulas are more readable:



                =IF(OR(A2={"Canada","Mexico"}), IF(C2>1000, "Ship by Air", IF(MONTH(B2)=7, "Ship by Air", "Ship by Ground")),FALSE)


                But we can combine the inner two as the output is the same on the true:



                =IF(OR(A2={"Canada","Mexico"}), IF(OR(C2>1000, MONTH(B2)=7), "Ship by Air", "Ship by Ground"),FALSE)




                Edit: this will return Ship by Air if any of the following are TRUE:




                • A2 equals "Canada" or "Mexico"

                • C2 > 1000

                • The Month of B2 is July


                :



                =IF(OR(A2={"Canada","Mexico"},C2>1000, MONTH(B2)=7), "Ship by Air", "Ship by Ground")




                Edit2: this will return Ship by Air if All of the following are TRUE:




                • A2 equals "Canada" or "Mexico"

                • C2 > 1000

                • The Month of B2 is July


                :



                =IF(AND(OR(A2={"Canada","Mexico"}),C2>1000, MONTH(B2)=7), "Ship by Air", "Ship by Ground")





                share|improve this answer














                OR needs each part to be its own Boolean expression:




                OR(A2="Canada","Mexico"




                Should be:



                OR(A2="Canada",A2="Mexico")


                OR



                OR(A2={"Canada","Mexico"})


                And




                MONTH(B2




                is missing the )



                So:



                =IF(OR(A2={"Canada","Mexico"}), IF(C2>1000, "Ship by Air", IF(MONTH(B2)=7, "Ship by Air", "Ship by Ground")))


                Also you are missing the FALSE on the outer IF, which may be what you want, but I tend to add it so my formulas are more readable:



                =IF(OR(A2={"Canada","Mexico"}), IF(C2>1000, "Ship by Air", IF(MONTH(B2)=7, "Ship by Air", "Ship by Ground")),FALSE)


                But we can combine the inner two as the output is the same on the true:



                =IF(OR(A2={"Canada","Mexico"}), IF(OR(C2>1000, MONTH(B2)=7), "Ship by Air", "Ship by Ground"),FALSE)




                Edit: this will return Ship by Air if any of the following are TRUE:




                • A2 equals "Canada" or "Mexico"

                • C2 > 1000

                • The Month of B2 is July


                :



                =IF(OR(A2={"Canada","Mexico"},C2>1000, MONTH(B2)=7), "Ship by Air", "Ship by Ground")




                Edit2: this will return Ship by Air if All of the following are TRUE:




                • A2 equals "Canada" or "Mexico"

                • C2 > 1000

                • The Month of B2 is July


                :



                =IF(AND(OR(A2={"Canada","Mexico"}),C2>1000, MONTH(B2)=7), "Ship by Air", "Ship by Ground")






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Dec 11 at 0:02

























                answered Dec 10 at 23:48









                Scott Craner

                11.2k1815




                11.2k1815

























                    2














                    You've got a good start; your formula is "pseudo-code" for what you want to accomplish. You just need to structure it for Excel.



                    The first problem is that the factors used by functions need to be enclosed in parentheses so Excel knows where they start and end. Your first OR doesn't have a close parenthesis; the same with the MONTH function.



                    The second problem is that the OR needs to contain a choice of complete conditions. Excel doesn't handle comparisons to a list, at least in a non-array format like you're using.



                    Also, the first IF doesn't contain a result for what to show if the OR is false, so you probably want to add that.



                    So the formula should look like:



                    =IF(OR(A2="Canada",A2="Mexico"), IF(C2>1000, "Ship by Air", IF(MONTH(B2)=7, "Ship by Air", "Ship by Ground")),"Not Canada or Mexico")





                    share|improve this answer























                    • Okay, that one worked for the most part, however the orders from USA are coming up as false rather than "ship by ground" for some reason.
                      – Anna
                      Dec 10 at 23:57










                    • @Anna so what you are saying is if A2 is canada or Mexico or c2>1000 or the month in B2 is July, if any of those are true then ship by air?
                      – Scott Craner
                      Dec 10 at 23:59










                    • @Anna, yeah, I had spotted the problem with no false result for the OR, then forgot why I included it in the answer and deleted it. Need more coffee. :-) I added that back in. You can change that last result to whatever you need (even another nested IF if the result could be something other than USA).
                      – fixer1234
                      Dec 11 at 0:00










                    • That one worked! Thank you!
                      – Anna
                      Dec 11 at 0:04










                    • @Anna, Scott raises a good point. You've got some complex rules for when to ship by what method. The safe bet would be to expand the question with the complete set of rules for what you want to do (in words or a table). Then we can verify that the Excel logic is actually implementing what you want.
                      – fixer1234
                      Dec 11 at 0:04


















                    2














                    You've got a good start; your formula is "pseudo-code" for what you want to accomplish. You just need to structure it for Excel.



                    The first problem is that the factors used by functions need to be enclosed in parentheses so Excel knows where they start and end. Your first OR doesn't have a close parenthesis; the same with the MONTH function.



                    The second problem is that the OR needs to contain a choice of complete conditions. Excel doesn't handle comparisons to a list, at least in a non-array format like you're using.



                    Also, the first IF doesn't contain a result for what to show if the OR is false, so you probably want to add that.



                    So the formula should look like:



                    =IF(OR(A2="Canada",A2="Mexico"), IF(C2>1000, "Ship by Air", IF(MONTH(B2)=7, "Ship by Air", "Ship by Ground")),"Not Canada or Mexico")





                    share|improve this answer























                    • Okay, that one worked for the most part, however the orders from USA are coming up as false rather than "ship by ground" for some reason.
                      – Anna
                      Dec 10 at 23:57










                    • @Anna so what you are saying is if A2 is canada or Mexico or c2>1000 or the month in B2 is July, if any of those are true then ship by air?
                      – Scott Craner
                      Dec 10 at 23:59










                    • @Anna, yeah, I had spotted the problem with no false result for the OR, then forgot why I included it in the answer and deleted it. Need more coffee. :-) I added that back in. You can change that last result to whatever you need (even another nested IF if the result could be something other than USA).
                      – fixer1234
                      Dec 11 at 0:00










                    • That one worked! Thank you!
                      – Anna
                      Dec 11 at 0:04










                    • @Anna, Scott raises a good point. You've got some complex rules for when to ship by what method. The safe bet would be to expand the question with the complete set of rules for what you want to do (in words or a table). Then we can verify that the Excel logic is actually implementing what you want.
                      – fixer1234
                      Dec 11 at 0:04
















                    2












                    2








                    2






                    You've got a good start; your formula is "pseudo-code" for what you want to accomplish. You just need to structure it for Excel.



                    The first problem is that the factors used by functions need to be enclosed in parentheses so Excel knows where they start and end. Your first OR doesn't have a close parenthesis; the same with the MONTH function.



                    The second problem is that the OR needs to contain a choice of complete conditions. Excel doesn't handle comparisons to a list, at least in a non-array format like you're using.



                    Also, the first IF doesn't contain a result for what to show if the OR is false, so you probably want to add that.



                    So the formula should look like:



                    =IF(OR(A2="Canada",A2="Mexico"), IF(C2>1000, "Ship by Air", IF(MONTH(B2)=7, "Ship by Air", "Ship by Ground")),"Not Canada or Mexico")





                    share|improve this answer














                    You've got a good start; your formula is "pseudo-code" for what you want to accomplish. You just need to structure it for Excel.



                    The first problem is that the factors used by functions need to be enclosed in parentheses so Excel knows where they start and end. Your first OR doesn't have a close parenthesis; the same with the MONTH function.



                    The second problem is that the OR needs to contain a choice of complete conditions. Excel doesn't handle comparisons to a list, at least in a non-array format like you're using.



                    Also, the first IF doesn't contain a result for what to show if the OR is false, so you probably want to add that.



                    So the formula should look like:



                    =IF(OR(A2="Canada",A2="Mexico"), IF(C2>1000, "Ship by Air", IF(MONTH(B2)=7, "Ship by Air", "Ship by Ground")),"Not Canada or Mexico")






                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Dec 10 at 23:56

























                    answered Dec 10 at 23:48









                    fixer1234

                    17.8k144581




                    17.8k144581












                    • Okay, that one worked for the most part, however the orders from USA are coming up as false rather than "ship by ground" for some reason.
                      – Anna
                      Dec 10 at 23:57










                    • @Anna so what you are saying is if A2 is canada or Mexico or c2>1000 or the month in B2 is July, if any of those are true then ship by air?
                      – Scott Craner
                      Dec 10 at 23:59










                    • @Anna, yeah, I had spotted the problem with no false result for the OR, then forgot why I included it in the answer and deleted it. Need more coffee. :-) I added that back in. You can change that last result to whatever you need (even another nested IF if the result could be something other than USA).
                      – fixer1234
                      Dec 11 at 0:00










                    • That one worked! Thank you!
                      – Anna
                      Dec 11 at 0:04










                    • @Anna, Scott raises a good point. You've got some complex rules for when to ship by what method. The safe bet would be to expand the question with the complete set of rules for what you want to do (in words or a table). Then we can verify that the Excel logic is actually implementing what you want.
                      – fixer1234
                      Dec 11 at 0:04




















                    • Okay, that one worked for the most part, however the orders from USA are coming up as false rather than "ship by ground" for some reason.
                      – Anna
                      Dec 10 at 23:57










                    • @Anna so what you are saying is if A2 is canada or Mexico or c2>1000 or the month in B2 is July, if any of those are true then ship by air?
                      – Scott Craner
                      Dec 10 at 23:59










                    • @Anna, yeah, I had spotted the problem with no false result for the OR, then forgot why I included it in the answer and deleted it. Need more coffee. :-) I added that back in. You can change that last result to whatever you need (even another nested IF if the result could be something other than USA).
                      – fixer1234
                      Dec 11 at 0:00










                    • That one worked! Thank you!
                      – Anna
                      Dec 11 at 0:04










                    • @Anna, Scott raises a good point. You've got some complex rules for when to ship by what method. The safe bet would be to expand the question with the complete set of rules for what you want to do (in words or a table). Then we can verify that the Excel logic is actually implementing what you want.
                      – fixer1234
                      Dec 11 at 0:04


















                    Okay, that one worked for the most part, however the orders from USA are coming up as false rather than "ship by ground" for some reason.
                    – Anna
                    Dec 10 at 23:57




                    Okay, that one worked for the most part, however the orders from USA are coming up as false rather than "ship by ground" for some reason.
                    – Anna
                    Dec 10 at 23:57












                    @Anna so what you are saying is if A2 is canada or Mexico or c2>1000 or the month in B2 is July, if any of those are true then ship by air?
                    – Scott Craner
                    Dec 10 at 23:59




                    @Anna so what you are saying is if A2 is canada or Mexico or c2>1000 or the month in B2 is July, if any of those are true then ship by air?
                    – Scott Craner
                    Dec 10 at 23:59












                    @Anna, yeah, I had spotted the problem with no false result for the OR, then forgot why I included it in the answer and deleted it. Need more coffee. :-) I added that back in. You can change that last result to whatever you need (even another nested IF if the result could be something other than USA).
                    – fixer1234
                    Dec 11 at 0:00




                    @Anna, yeah, I had spotted the problem with no false result for the OR, then forgot why I included it in the answer and deleted it. Need more coffee. :-) I added that back in. You can change that last result to whatever you need (even another nested IF if the result could be something other than USA).
                    – fixer1234
                    Dec 11 at 0:00












                    That one worked! Thank you!
                    – Anna
                    Dec 11 at 0:04




                    That one worked! Thank you!
                    – Anna
                    Dec 11 at 0:04












                    @Anna, Scott raises a good point. You've got some complex rules for when to ship by what method. The safe bet would be to expand the question with the complete set of rules for what you want to do (in words or a table). Then we can verify that the Excel logic is actually implementing what you want.
                    – fixer1234
                    Dec 11 at 0:04






                    @Anna, Scott raises a good point. You've got some complex rules for when to ship by what method. The safe bet would be to expand the question with the complete set of rules for what you want to do (in words or a table). Then we can verify that the Excel logic is actually implementing what you want.
                    – fixer1234
                    Dec 11 at 0:04













                    0














                    Count the brackets: You have five opening brackets and three closing brackets. But the counts have to match.



                    You can see the problem with correct indenting of the expression:



                    =IF(
                    OR(
                    A2="Canada","Mexico",
                    IF(
                    C2>1000, "Ship by Air",
                    IF(
                    MONTH(
                    B2=7, "Ship by Air", "Ship by Ground"
                    )
                    )
                    )
                    // ---------------- Here your expression ends
                    ) // missing
                    ) // missing


                    I marked the two missing closing brackets. Which expressions your want to close with ) depends on the logic you want to implement.






                    share|improve this answer





















                    • So I just need to add more closing parentheses? I just tried that, so now there are 5 opening and 5 ending, but it is giving me the same error message.
                      – Anna
                      Dec 10 at 23:43










                    • A quick glance at the Office documentation shows that the MONTH(...) function takes one argument. You provided three :-/ So remove =7, "Ship by Air", "Ship by Ground" and you should be closer to a working expression. Remember to also check the IF and OR clauses this way, because it looks like the second IF clause is also wrong, because it seems to need three arguments. See IF clause.
                      – zx485
                      Dec 10 at 23:47


















                    0














                    Count the brackets: You have five opening brackets and three closing brackets. But the counts have to match.



                    You can see the problem with correct indenting of the expression:



                    =IF(
                    OR(
                    A2="Canada","Mexico",
                    IF(
                    C2>1000, "Ship by Air",
                    IF(
                    MONTH(
                    B2=7, "Ship by Air", "Ship by Ground"
                    )
                    )
                    )
                    // ---------------- Here your expression ends
                    ) // missing
                    ) // missing


                    I marked the two missing closing brackets. Which expressions your want to close with ) depends on the logic you want to implement.






                    share|improve this answer





















                    • So I just need to add more closing parentheses? I just tried that, so now there are 5 opening and 5 ending, but it is giving me the same error message.
                      – Anna
                      Dec 10 at 23:43










                    • A quick glance at the Office documentation shows that the MONTH(...) function takes one argument. You provided three :-/ So remove =7, "Ship by Air", "Ship by Ground" and you should be closer to a working expression. Remember to also check the IF and OR clauses this way, because it looks like the second IF clause is also wrong, because it seems to need three arguments. See IF clause.
                      – zx485
                      Dec 10 at 23:47
















                    0












                    0








                    0






                    Count the brackets: You have five opening brackets and three closing brackets. But the counts have to match.



                    You can see the problem with correct indenting of the expression:



                    =IF(
                    OR(
                    A2="Canada","Mexico",
                    IF(
                    C2>1000, "Ship by Air",
                    IF(
                    MONTH(
                    B2=7, "Ship by Air", "Ship by Ground"
                    )
                    )
                    )
                    // ---------------- Here your expression ends
                    ) // missing
                    ) // missing


                    I marked the two missing closing brackets. Which expressions your want to close with ) depends on the logic you want to implement.






                    share|improve this answer












                    Count the brackets: You have five opening brackets and three closing brackets. But the counts have to match.



                    You can see the problem with correct indenting of the expression:



                    =IF(
                    OR(
                    A2="Canada","Mexico",
                    IF(
                    C2>1000, "Ship by Air",
                    IF(
                    MONTH(
                    B2=7, "Ship by Air", "Ship by Ground"
                    )
                    )
                    )
                    // ---------------- Here your expression ends
                    ) // missing
                    ) // missing


                    I marked the two missing closing brackets. Which expressions your want to close with ) depends on the logic you want to implement.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Dec 10 at 23:40









                    zx485

                    720613




                    720613












                    • So I just need to add more closing parentheses? I just tried that, so now there are 5 opening and 5 ending, but it is giving me the same error message.
                      – Anna
                      Dec 10 at 23:43










                    • A quick glance at the Office documentation shows that the MONTH(...) function takes one argument. You provided three :-/ So remove =7, "Ship by Air", "Ship by Ground" and you should be closer to a working expression. Remember to also check the IF and OR clauses this way, because it looks like the second IF clause is also wrong, because it seems to need three arguments. See IF clause.
                      – zx485
                      Dec 10 at 23:47




















                    • So I just need to add more closing parentheses? I just tried that, so now there are 5 opening and 5 ending, but it is giving me the same error message.
                      – Anna
                      Dec 10 at 23:43










                    • A quick glance at the Office documentation shows that the MONTH(...) function takes one argument. You provided three :-/ So remove =7, "Ship by Air", "Ship by Ground" and you should be closer to a working expression. Remember to also check the IF and OR clauses this way, because it looks like the second IF clause is also wrong, because it seems to need three arguments. See IF clause.
                      – zx485
                      Dec 10 at 23:47


















                    So I just need to add more closing parentheses? I just tried that, so now there are 5 opening and 5 ending, but it is giving me the same error message.
                    – Anna
                    Dec 10 at 23:43




                    So I just need to add more closing parentheses? I just tried that, so now there are 5 opening and 5 ending, but it is giving me the same error message.
                    – Anna
                    Dec 10 at 23:43












                    A quick glance at the Office documentation shows that the MONTH(...) function takes one argument. You provided three :-/ So remove =7, "Ship by Air", "Ship by Ground" and you should be closer to a working expression. Remember to also check the IF and OR clauses this way, because it looks like the second IF clause is also wrong, because it seems to need three arguments. See IF clause.
                    – zx485
                    Dec 10 at 23:47






                    A quick glance at the Office documentation shows that the MONTH(...) function takes one argument. You provided three :-/ So remove =7, "Ship by Air", "Ship by Ground" and you should be closer to a working expression. Remember to also check the IF and OR clauses this way, because it looks like the second IF clause is also wrong, because it seems to need three arguments. See IF clause.
                    – zx485
                    Dec 10 at 23:47




















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1382470%2fexcel-saying-too-many-arguments-for-if-and-month-function%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Paul Cézanne

                    UIScrollView CustomStickyHeader Resize height generates problems when scroll is too fast

                    Angular material date-picker (MatDatepicker) auto completes the date on focus out