Having trouble in nested IFs in excel with true or false values in each IF statement











up vote
0
down vote

favorite












=IF(AND(A2<=20151231),(B2=0) 0, 15, IF(AND(A2>=20190101,B2>=2),15, 7.5))



This is what I entered in the function.



if A2 is less than 20151231 and B2 is equal to 0 the value will be 0.
if A2 is greater than 20190101 and B2 is equal to or greater than 2 the value will be 15.



the problem is that excel says that I entered too many arguments and when I try to derive it it says that there is something wrong with the function I entered.










share|improve this question






















  • If the first statement is false the value will be 15 If the second statement is false the value will be 7.5. this is my first time in excel please help.
    – CS1969
    Nov 20 at 6:24












  • Try =IF(AND(A2<=20151231,B2=0), 0,IF(AND(A2>=20190101,B2>=2),15, 7.5)) but not sure exactly what you want, as you were closing too many brackets...
    – Solar Mike
    Nov 20 at 7:06










  • And the 7.5 in your formula?
    – QHarr
    Nov 20 at 7:16















up vote
0
down vote

favorite












=IF(AND(A2<=20151231),(B2=0) 0, 15, IF(AND(A2>=20190101,B2>=2),15, 7.5))



This is what I entered in the function.



if A2 is less than 20151231 and B2 is equal to 0 the value will be 0.
if A2 is greater than 20190101 and B2 is equal to or greater than 2 the value will be 15.



the problem is that excel says that I entered too many arguments and when I try to derive it it says that there is something wrong with the function I entered.










share|improve this question






















  • If the first statement is false the value will be 15 If the second statement is false the value will be 7.5. this is my first time in excel please help.
    – CS1969
    Nov 20 at 6:24












  • Try =IF(AND(A2<=20151231,B2=0), 0,IF(AND(A2>=20190101,B2>=2),15, 7.5)) but not sure exactly what you want, as you were closing too many brackets...
    – Solar Mike
    Nov 20 at 7:06










  • And the 7.5 in your formula?
    – QHarr
    Nov 20 at 7:16













up vote
0
down vote

favorite









up vote
0
down vote

favorite











=IF(AND(A2<=20151231),(B2=0) 0, 15, IF(AND(A2>=20190101,B2>=2),15, 7.5))



This is what I entered in the function.



if A2 is less than 20151231 and B2 is equal to 0 the value will be 0.
if A2 is greater than 20190101 and B2 is equal to or greater than 2 the value will be 15.



the problem is that excel says that I entered too many arguments and when I try to derive it it says that there is something wrong with the function I entered.










share|improve this question













=IF(AND(A2<=20151231),(B2=0) 0, 15, IF(AND(A2>=20190101,B2>=2),15, 7.5))



This is what I entered in the function.



if A2 is less than 20151231 and B2 is equal to 0 the value will be 0.
if A2 is greater than 20190101 and B2 is equal to or greater than 2 the value will be 15.



the problem is that excel says that I entered too many arguments and when I try to derive it it says that there is something wrong with the function I entered.







excel if-statement nested






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 20 at 6:19









CS1969

112




112












  • If the first statement is false the value will be 15 If the second statement is false the value will be 7.5. this is my first time in excel please help.
    – CS1969
    Nov 20 at 6:24












  • Try =IF(AND(A2<=20151231,B2=0), 0,IF(AND(A2>=20190101,B2>=2),15, 7.5)) but not sure exactly what you want, as you were closing too many brackets...
    – Solar Mike
    Nov 20 at 7:06










  • And the 7.5 in your formula?
    – QHarr
    Nov 20 at 7:16


















  • If the first statement is false the value will be 15 If the second statement is false the value will be 7.5. this is my first time in excel please help.
    – CS1969
    Nov 20 at 6:24












  • Try =IF(AND(A2<=20151231,B2=0), 0,IF(AND(A2>=20190101,B2>=2),15, 7.5)) but not sure exactly what you want, as you were closing too many brackets...
    – Solar Mike
    Nov 20 at 7:06










  • And the 7.5 in your formula?
    – QHarr
    Nov 20 at 7:16
















If the first statement is false the value will be 15 If the second statement is false the value will be 7.5. this is my first time in excel please help.
– CS1969
Nov 20 at 6:24






If the first statement is false the value will be 15 If the second statement is false the value will be 7.5. this is my first time in excel please help.
– CS1969
Nov 20 at 6:24














Try =IF(AND(A2<=20151231,B2=0), 0,IF(AND(A2>=20190101,B2>=2),15, 7.5)) but not sure exactly what you want, as you were closing too many brackets...
– Solar Mike
Nov 20 at 7:06




Try =IF(AND(A2<=20151231,B2=0), 0,IF(AND(A2>=20190101,B2>=2),15, 7.5)) but not sure exactly what you want, as you were closing too many brackets...
– Solar Mike
Nov 20 at 7:06












And the 7.5 in your formula?
– QHarr
Nov 20 at 7:16




And the 7.5 in your formula?
– QHarr
Nov 20 at 7:16












2 Answers
2






active

oldest

votes

















up vote
0
down vote













Try this:
=IF(AND(A2<=20151231,B2=0),"0",IF(AND(A2>=20191010,B2>=2),15,""))
it seems your formula has too much close and open parenthesis. When using "and()" enclose all logic in one set of parenthesis.
Hope this helps. Thanks






share|improve this answer




























    up vote
    0
    down vote













    Reymond's answer is correct, assuming that you want the result to be:



    0   - if A2<=20151231 AND B2=0
    15 - if A2>=20190101 AND B2>=2
    7.5 - if neither of these cases are true.


    If you are struggling to see what parameters you are passing to which function, I would suggest that you format your formulas so that they are easier to read:



    =IF(
    AND(A2<=20151231, B2=0),
    0,
    IF(
    AND(A2>=20190101,B2>=2),
    15,
    7.5
    )
    )


    This makes it much easier to see what is going on and it can even be done in the excel formula bar if you wish (by using Alt+Enter):



    enter image description here






    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      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',
      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%2fstackoverflow.com%2fquestions%2f53387312%2fhaving-trouble-in-nested-ifs-in-excel-with-true-or-false-values-in-each-if-state%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      0
      down vote













      Try this:
      =IF(AND(A2<=20151231,B2=0),"0",IF(AND(A2>=20191010,B2>=2),15,""))
      it seems your formula has too much close and open parenthesis. When using "and()" enclose all logic in one set of parenthesis.
      Hope this helps. Thanks






      share|improve this answer

























        up vote
        0
        down vote













        Try this:
        =IF(AND(A2<=20151231,B2=0),"0",IF(AND(A2>=20191010,B2>=2),15,""))
        it seems your formula has too much close and open parenthesis. When using "and()" enclose all logic in one set of parenthesis.
        Hope this helps. Thanks






        share|improve this answer























          up vote
          0
          down vote










          up vote
          0
          down vote









          Try this:
          =IF(AND(A2<=20151231,B2=0),"0",IF(AND(A2>=20191010,B2>=2),15,""))
          it seems your formula has too much close and open parenthesis. When using "and()" enclose all logic in one set of parenthesis.
          Hope this helps. Thanks






          share|improve this answer












          Try this:
          =IF(AND(A2<=20151231,B2=0),"0",IF(AND(A2>=20191010,B2>=2),15,""))
          it seems your formula has too much close and open parenthesis. When using "and()" enclose all logic in one set of parenthesis.
          Hope this helps. Thanks







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 20 at 7:34









          Reymond

          93




          93
























              up vote
              0
              down vote













              Reymond's answer is correct, assuming that you want the result to be:



              0   - if A2<=20151231 AND B2=0
              15 - if A2>=20190101 AND B2>=2
              7.5 - if neither of these cases are true.


              If you are struggling to see what parameters you are passing to which function, I would suggest that you format your formulas so that they are easier to read:



              =IF(
              AND(A2<=20151231, B2=0),
              0,
              IF(
              AND(A2>=20190101,B2>=2),
              15,
              7.5
              )
              )


              This makes it much easier to see what is going on and it can even be done in the excel formula bar if you wish (by using Alt+Enter):



              enter image description here






              share|improve this answer



























                up vote
                0
                down vote













                Reymond's answer is correct, assuming that you want the result to be:



                0   - if A2<=20151231 AND B2=0
                15 - if A2>=20190101 AND B2>=2
                7.5 - if neither of these cases are true.


                If you are struggling to see what parameters you are passing to which function, I would suggest that you format your formulas so that they are easier to read:



                =IF(
                AND(A2<=20151231, B2=0),
                0,
                IF(
                AND(A2>=20190101,B2>=2),
                15,
                7.5
                )
                )


                This makes it much easier to see what is going on and it can even be done in the excel formula bar if you wish (by using Alt+Enter):



                enter image description here






                share|improve this answer

























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Reymond's answer is correct, assuming that you want the result to be:



                  0   - if A2<=20151231 AND B2=0
                  15 - if A2>=20190101 AND B2>=2
                  7.5 - if neither of these cases are true.


                  If you are struggling to see what parameters you are passing to which function, I would suggest that you format your formulas so that they are easier to read:



                  =IF(
                  AND(A2<=20151231, B2=0),
                  0,
                  IF(
                  AND(A2>=20190101,B2>=2),
                  15,
                  7.5
                  )
                  )


                  This makes it much easier to see what is going on and it can even be done in the excel formula bar if you wish (by using Alt+Enter):



                  enter image description here






                  share|improve this answer














                  Reymond's answer is correct, assuming that you want the result to be:



                  0   - if A2<=20151231 AND B2=0
                  15 - if A2>=20190101 AND B2>=2
                  7.5 - if neither of these cases are true.


                  If you are struggling to see what parameters you are passing to which function, I would suggest that you format your formulas so that they are easier to read:



                  =IF(
                  AND(A2<=20151231, B2=0),
                  0,
                  IF(
                  AND(A2>=20190101,B2>=2),
                  15,
                  7.5
                  )
                  )


                  This makes it much easier to see what is going on and it can even be done in the excel formula bar if you wish (by using Alt+Enter):



                  enter image description here







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 20 at 11:07

























                  answered Nov 20 at 10:59









                  Gravitate

                  1,1611125




                  1,1611125






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • 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%2fstackoverflow.com%2fquestions%2f53387312%2fhaving-trouble-in-nested-ifs-in-excel-with-true-or-false-values-in-each-if-state%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

                      To store a contact into the json file from server.js file using a class in NodeJS

                      Redirect URL with Chrome Remote Debugging Android Devices

                      Dieringhausen