#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default simple IF question

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default simple IF question

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default simple IF question

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default simple IF question

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default simple IF question

=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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple question [email protected] New Users to Excel 4 March 24th 08 07:47 PM
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Simple Question cjjoo Excel Worksheet Functions 2 October 12th 05 04:38 AM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
simple question? David New Users to Excel 1 November 25th 04 10:02 PM


All times are GMT +1. The time now is 02:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"