ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   if statement with "&" (https://www.excelbanter.com/excel-worksheet-functions/142024-if-statement.html)

joanie23

if statement with "&"
 
I want to compare two quarter grades to see if a student improved, stayed the
same or decreased. the first quarter is cell b3 and the second quarter is
cell b8.

if the first quarter is "s", and the second quarter is either "u" or "i"
then the student decreaed. If the first quarter is "u" and the second quarter
is "s" or "i" then the student improved. If the first quarter is "i" and the
second quarter is "s" then the student improved. If the first quarter is "i"
and the second quarter is "u" then the student decreased.

My if statement isn't working properly - see below. Any suggestions? thanks.

=IF(B3=B8,"same",IF(B3="s"&B8<"s","declined", IF(B3="u"&B8<"u",
"improved", IF(B3="i"&B8="s", "improved","down"))))



Niek Otten

if statement with "&"
 
Look in HELP for the AND() function

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"joanie23" wrote in message ...
|I want to compare two quarter grades to see if a student improved, stayed the
| same or decreased. the first quarter is cell b3 and the second quarter is
| cell b8.
|
| if the first quarter is "s", and the second quarter is either "u" or "i"
| then the student decreaed. If the first quarter is "u" and the second quarter
| is "s" or "i" then the student improved. If the first quarter is "i" and the
| second quarter is "s" then the student improved. If the first quarter is "i"
| and the second quarter is "u" then the student decreased.
|
| My if statement isn't working properly - see below. Any suggestions? thanks.
|
| =IF(B3=B8,"same",IF(B3="s"&B8<"s","declined", IF(B3="u"&B8<"u",
| "improved", IF(B3="i"&B8="s", "improved","down"))))
|
|



Duke Carey

if statement with "&"
 
Rewrite to use AND(), except you don't need it

=IF(B3=B8,"same",IF(B3="s","declined",IF(B3="u","i mproved",
IF(B8="s","improved","declined"))))


"joanie23" wrote:

I want to compare two quarter grades to see if a student improved, stayed the
same or decreased. the first quarter is cell b3 and the second quarter is
cell b8.

if the first quarter is "s", and the second quarter is either "u" or "i"
then the student decreaed. If the first quarter is "u" and the second quarter
is "s" or "i" then the student improved. If the first quarter is "i" and the
second quarter is "s" then the student improved. If the first quarter is "i"
and the second quarter is "u" then the student decreased.

My if statement isn't working properly - see below. Any suggestions? thanks.

=IF(B3=B8,"same",IF(B3="s"&B8<"s","declined", IF(B3="u"&B8<"u",
"improved", IF(B3="i"&B8="s", "improved","down"))))



Gary

if statement with "&"
 
try this

=IF(B3=B8,"SAME",IF(AND(B3="S",B8="S"),"DECLINED", IF(AND(B3="U",B8<"U"),"IMPROVED",IF(AND(B3="I",B8 ="S"),"IMPROVED","DOWN"))))

Should work.
Thanks
Gary


"joanie23" wrote in message
...
I want to compare two quarter grades to see if a student improved, stayed
the
same or decreased. the first quarter is cell b3 and the second quarter is
cell b8.

if the first quarter is "s", and the second quarter is either "u" or "i"
then the student decreaed. If the first quarter is "u" and the second
quarter
is "s" or "i" then the student improved. If the first quarter is "i" and
the
second quarter is "s" then the student improved. If the first quarter is
"i"
and the second quarter is "u" then the student decreased.

My if statement isn't working properly - see below. Any suggestions?
thanks.

=IF(B3=B8,"same",IF(B3="s"&B8<"s","declined", IF(B3="u"&B8<"u",
"improved", IF(B3="i"&B8="s", "improved","down"))))





Gary

if statement with "&"
 
small correction

=IF(B3=B8,"SAME",IF(AND(B3="S",B8<"S"),"DECLINED" ,IF(AND(B3="U",B8<"U"),"IMPROVED",IF(AND(B3="I",B 8="S"),"IMPROVED","DOWN"))))


"Gary" wrote in message
...
try this

=IF(B3=B8,"SAME",IF(AND(B3="S",B8="S"),"DECLINED", IF(AND(B3="U",B8<"U"),"IMPROVED",IF(AND(B3="I",B8 ="S"),"IMPROVED","DOWN"))))

Should work.
Thanks
Gary


"joanie23" wrote in message
...
I want to compare two quarter grades to see if a student improved, stayed
the
same or decreased. the first quarter is cell b3 and the second quarter is
cell b8.

if the first quarter is "s", and the second quarter is either "u" or "i"
then the student decreaed. If the first quarter is "u" and the second
quarter
is "s" or "i" then the student improved. If the first quarter is "i" and
the
second quarter is "s" then the student improved. If the first quarter is
"i"
and the second quarter is "u" then the student decreased.

My if statement isn't working properly - see below. Any suggestions?
thanks.

=IF(B3=B8,"same",IF(B3="s"&B8<"s","declined", IF(B3="u"&B8<"u",
"improved", IF(B3="i"&B8="s", "improved","down"))))







Duke Carey

if statement with "&"
 
Joanie23 -

Your formula (and Gary's) is WAY TOO COMPLEX. Look at the one I gave you.
It gives precisely the answers you want, but is far simpler.

"Gary" wrote:

small correction

=IF(B3=B8,"SAME",IF(AND(B3="S",B8<"S"),"DECLINED" ,IF(AND(B3="U",B8<"U"),"IMPROVED",IF(AND(B3="I",B 8="S"),"IMPROVED","DOWN"))))


"Gary" wrote in message
...
try this

=IF(B3=B8,"SAME",IF(AND(B3="S",B8="S"),"DECLINED", IF(AND(B3="U",B8<"U"),"IMPROVED",IF(AND(B3="I",B8 ="S"),"IMPROVED","DOWN"))))

Should work.
Thanks
Gary


"joanie23" wrote in message
...
I want to compare two quarter grades to see if a student improved, stayed
the
same or decreased. the first quarter is cell b3 and the second quarter is
cell b8.

if the first quarter is "s", and the second quarter is either "u" or "i"
then the student decreaed. If the first quarter is "u" and the second
quarter
is "s" or "i" then the student improved. If the first quarter is "i" and
the
second quarter is "s" then the student improved. If the first quarter is
"i"
and the second quarter is "u" then the student decreased.

My if statement isn't working properly - see below. Any suggestions?
thanks.

=IF(B3=B8,"same",IF(B3="s"&B8<"s","declined", IF(B3="u"&B8<"u",
"improved", IF(B3="i"&B8="s", "improved","down"))))









All times are GMT +1. The time now is 10:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com