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.
excel if-statement nested
add a comment |
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.
excel if-statement nested
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
add a comment |
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.
excel if-statement nested
=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
excel if-statement nested
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
add a comment |
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
add a comment |
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
add a comment |
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):
add a comment |
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
add a comment |
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
add a comment |
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
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
answered Nov 20 at 7:34
Reymond
93
93
add a comment |
add a comment |
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):
add a comment |
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):
add a comment |
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):
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):
edited Nov 20 at 11:07
answered Nov 20 at 10:59
Gravitate
1,1611125
1,1611125
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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