Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
kevin
 
Posts: n/a
Default How to express this in an if statement.

I hope someone might be able to show me how to express the following in an IF
statement. =if(a1 is between 0 and 3 then "low", if(a1 is between 4 and 6
then "medium", if(a1 is between 7 and 10 then "high", if(a110 then
"extreme", "")
--
Thanks Kevin
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

If one can assume that there will be no numbers < 0, and that all
numbers are integers:

=LOOKUP(A1,{0,4,7,11},{"low","medium","high","extr eme"})

(otherwise, you need to specify what happens for negative numbers and
non-integers, like 6.5)

As an IF() statement:


Strictly:

=IF(AND(A1=0,A1<=3),"low",IF(AND(A1=4,A1<=6),"me dium",
IF(AND(A1=7,A1<=10),"high",IF(A110,"extreme","so mething else"))))

or, using the above assumptions:

=IF(A1<=3,"low",IF(A1<=6,"medium",IF(A1<=10,"high" ,"extreme")))



In article ,
"kevin" wrote:

I hope someone might be able to show me how to express the following in an IF
statement. =if(a1 is between 0 and 3 then "low", if(a1 is between 4 and 6
then "medium", if(a1 is between 7 and 10 then "high", if(a110 then
"extreme", "")

  #3   Report Post  
Niek Otten
 
Posts: n/a
Default

Hi Kevin,

You don't tell what it has to be if A1<0, what if it is 3.5, etc, but this
may help:

=IF(A1<4,"low",IF(A1<7,"medium",IF(A1<11,"high","e xtreme")))

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"kevin" wrote in message
...
I hope someone might be able to show me how to express the following in an
IF
statement. =if(a1 is between 0 and 3 then "low", if(a1 is between 4 and 6
then "medium", if(a1 is between 7 and 10 then "high", if(a110 then
"extreme", "")
--
Thanks Kevin



  #4   Report Post  
kevin
 
Posts: n/a
Default

Thanks very much for your help, works great.

"Niek Otten" wrote:

Hi Kevin,

You don't tell what it has to be if A1<0, what if it is 3.5, etc, but this
may help:

=IF(A1<4,"low",IF(A1<7,"medium",IF(A1<11,"high","e xtreme")))

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"kevin" wrote in message
...
I hope someone might be able to show me how to express the following in an
IF
statement. =if(a1 is between 0 and 3 then "low", if(a1 is between 4 and 6
then "medium", if(a1 is between 7 and 10 then "high", if(a110 then
"extreme", "")
--
Thanks Kevin




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
IF Statement with Average Function results in #Value! Paul Excel Discussion (Misc queries) 5 December 28th 04 08:11 AM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM
Statement lintan Excel Worksheet Functions 1 December 2nd 04 11:31 PM
Duplicate fields does not match up! If statement Patsy Excel Worksheet Functions 0 November 11th 04 12:16 AM
IF Statement difficulty susan hayes Excel Worksheet Functions 3 November 2nd 04 09:46 PM


All times are GMT +1. The time now is 11:41 AM.

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

About Us

"It's about Microsoft Excel"