View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Michael Gill
 
Posts: n/a
Default IF/WHEN forumla fo when a cell is between two numbers

Hi philo

This one should do it for you
=IF(AND(B11000,B1<1999),"A",IF(AND(B11999,B1<299 9),"B",IF(AND(B12999,B1<3999),"C",IF(AND(B13999, B1<4999),"D"))))

Michael

"philo351" wrote:


I'm trying to use a multiple "multiple" IF/WHEN formula for when a
number falls between two numbers. For example, if a number falls
anywhere between 1000 and 1999, then I need result A. If the number
falls between 2000 and 2999, then I need result B. For anything falling
between 3000-3999, I need result B ...etc.

Currently I'm hoping to apply this to a multiple IF/WHEN forumula which
is as follows


=IF((B21000),A,IF((B22000),B,IF((B23000),C,IF(( B24000),D,""))))

now obviously this isn't going to work. I need each condition to apply
to a range between two numbers which would operate this way:

=IF((B2 is between 1000 and 2999),A,IF((B2is between 2000 and
2999),B,IF((B2is between 3000 and 3999),C,IF((B2 is between 4000 and
4999),D,""))))

any ideas? do I need to write a VBA script for this?


--
philo351
------------------------------------------------------------------------
philo351's Profile: http://www.excelforum.com/member.php...o&userid=30295
View this thread: http://www.excelforum.com/showthread...hreadid=499624