Warning

 

Close
Confirm Action

Are you sure you wish to do this?

Cancel Confirm
AR15.COM
7/8/2016 10:48:42 PM EDT
I'm trying to use IF and AND functions.  This should be really simple but I can't get the syntax correct, and all of the tutorials/information I've found on the subject gives information for referencing two cells (if cell A1 is X and cell A2 is Y etc)

Here's what I'm trying to do:

I want cell A2 to display "X" if the value in cell A1 is  >=100, display "Y" if cell A1 is >100 but <=200, display "Z" if cell A1 is >200

BTW this is a really fucking random question for a Friday night.
7/8/2016 10:51:08 PM EDT
[#1]
=IF(A1>=100,"X",IF(AND(A1>100,A1<=200),"Y",IF(A1>200,"Z","")))
7/8/2016 10:53:21 PM EDT
[#2]
Try nesting the AND or OR after the IF.
It lets you have as many Boolean operations as you want.

Perfect for running multiple tests and resulting different outputs depending on the input value.
7/8/2016 10:55:45 PM EDT
[#3]
Quote History
Quoted:
=IF(A1>=100,"X",IF(AND(A1>100,A1<=200),"Y",IF(A1>200,"Z","")))
View Quote


THANK YOU

I had the "AND" operator in the wrong spot.  

ARF is the shit
7/8/2016 10:57:20 PM EDT
[#4]
Quote History
Quoted:


THANK YOU

I had the "AND" operator in the wrong spot.  

ARF is the shit
View Quote View All Quotes
View All Quotes
Quote History
Quoted:
Quoted:
=IF(A1>=100,"X",IF(AND(A1>100,A1<=200),"Y",IF(A1>200,"Z","")))


THANK YOU

I had the "AND" operator in the wrong spot.  

ARF is the shit



I do shit with Excel that most people pass off as impossible.  Reach out anytime for help.
7/8/2016 10:59:05 PM EDT
[#5]
Quote History
Quoted:



I do shit with Excel that most people pass off as impossible.  Reach out anytime for help.
View Quote View All Quotes
View All Quotes
Quote History
Quoted:
Quoted:
Quoted:
=IF(A1>=100,"X",IF(AND(A1>100,A1<=200),"Y",IF(A1>200,"Z","")))


THANK YOU

I had the "AND" operator in the wrong spot.  

ARF is the shit



I do shit with Excel that most people pass off as impossible.  Reach out anytime for help.


Mind if I keep you in mind as well? Sometimes I need to pull off a Jedi mind trick at work with a spreadsheet.
7/8/2016 11:00:31 PM EDT
[#6]
I can sort of document by a to z
7/8/2016 11:02:31 PM EDT
[#7]
Quote History
Quoted:


Mind if I keep you in mind as well? Sometimes I need to pull off a Jedi mind trick at work with a spreadsheet.
View Quote View All Quotes
View All Quotes
Quote History
Quoted:
Quoted:
Quoted:
Quoted:
=IF(A1>=100,"X",IF(AND(A1>100,A1<=200),"Y",IF(A1>200,"Z","")))


THANK YOU

I had the "AND" operator in the wrong spot.  

ARF is the shit



I do shit with Excel that most people pass off as impossible.  Reach out anytime for help.


Mind if I keep you in mind as well? Sometimes I need to pull off a Jedi mind trick at work with a spreadsheet.



Please do.  Built a career out of using Excel the way I do.  Happy to help.
7/8/2016 11:22:30 PM EDT
[#8]
Quote History
Quoted:



I do shit with Excel that most people pass off as impossible.  Reach out anytime for help.
View Quote View All Quotes
View All Quotes
Quote History
Quoted:
Quoted:
Quoted:
=IF(A1>=100,"X",IF(AND(A1>100,A1<=200),"Y",IF(A1>200,"Z","")))


THANK YOU

I had the "AND" operator in the wrong spot.  

ARF is the shit



I do shit with Excel that most people pass off as impossible.  Reach out anytime for help.

You are a wizard.
7/8/2016 11:33:16 PM EDT
[#9]
I guess my services aren't needed.  GD knows all.