![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
Trying to build a simple if/then statement measuring ranges. For example:
Cell A1 is greater than 50 but less than 100. Cell A2 is greater than 100 but less than 500. I need an if/then statement to say: if A1 is between 50 and 100,then "TRUE", else "false". |
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
=AND(A1>50,A1<100)
|
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
Thanks for the quickk response. But where does the "and" statement fit into the formula with if/then?
=if(a1>50,"green",if(a1>50,<100,"Blue",0)) Can't seem to get it to work... |
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,512
|
=if(a1>50,"green",if(and(a1>50,a1<100),"Blue",0))
__________________
~Anne Troy |
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,512
|
LOL, don't confuse me! ROFL...
What color do you want if it is, say 60? Did you want your first part to be LESS than 50? Just fix my formula above (or Juanito's).
__________________
~Anne Troy |
|
|
|
|
|
#6 |
|
Guest
Posts: n/a
|
Thanks. i noticed that my example was crap - so i took a stab at something else....green & blue.
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|