Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How do I write a formula that would evaluate a cell and return different
values? IF cell = 1 or 2, return "A", if cell = 3, 4 or 5, return "B" |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On 16 maio, 13:53, bokey wrote:
How do I write a formula that would evaluate a cell and return different values? IF cell = 1 or 2, return "A", if cell = 3, 4 or 5, return "B" Try this: =IF(OR(Cell=1;Cell=2);"A";IF(OR(Cell=3;Cell=4;Cell =5);"B";"")). |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try this:
=IF(OR(Cell=1;Cell=2);"A";IF(OR(Cell=3;Cell=4;Cell =5);"B";"")). You can "tighten" that formula up some... =IF(OR(Cell={1,2}),"A",IF(OR(Cell={3,4,5}),"B","") ) Note: My system uses commas (instead of semi-colons) as argument delimiters. Rick |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Both formulas worked Thank you for sharing.
"Rick Rothstein (MVP - VB)" wrote: Try this: =IF(OR(Cell=1;Cell=2);"A";IF(OR(Cell=3;Cell=4;Cell =5);"B";"")). You can "tighten" that formula up some... =IF(OR(Cell={1,2}),"A",IF(OR(Cell={3,4,5}),"B","") ) Note: My system uses commas (instead of semi-colons) as argument delimiters. Rick |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=if(or(a1={1,2}),"A",if(or(a1={3,4,5}),"B","not 1, 2, 3, 4, or 5"))
or =if(or(a1=1,a1=2),"A",if(or(a1=3,a1=4,a1=5),"B","n ot 1, 2, 3, 4, or 5")) bokey wrote: How do I write a formula that would evaluate a cell and return different values? IF cell = 1 or 2, return "A", if cell = 3, 4 or 5, return "B" -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simple question | New Users to Excel | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Simple Question | Excel Worksheet Functions | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) | |||
simple question? | New Users to Excel |