ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If(and spread sheet syntax (https://www.excelbanter.com/excel-worksheet-functions/49897-if-spread-sheet-syntax.html)

saziz

If(and spread sheet syntax
 

Hello All,
I am trying to test a range of values in a cell:

if(and("a1" is 0 to 10, "Jack"), if("a1" is 10001 to 11000, "Jim),
if("a1" is 11000 to 12000, "Joe')

Can anyone give me the correct systax or any other way to test this?
Thank you
Syed


--
saziz
------------------------------------------------------------------------
saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350
View this thread: http://www.excelforum.com/showthread...hreadid=475212


Aladin Akyurek

Better to invoke a LOOKUP formula, something like:

=LOOKUP(A1,{0,2.229E-308,11,10001,11000},{"","Jack","","Jim","Joe"})

saziz wrote:
Hello All,
I am trying to test a range of values in a cell:

if(and("a1" is 0 to 10, "Jack"), if("a1" is 10001 to 11000, "Jim),
if("a1" is 11000 to 12000, "Joe')

Can anyone give me the correct systax or any other way to test this?
Thank you
Syed



RagDyer

One way:

=IF(AND(A1=0,A1<=10),"Jack",IF(AND(A1=10001,A1<= 11000),"Jim",IF(AND(A1=11
001,A1<=12000),"Joe","No Match")))
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================



"saziz" wrote in
message ...

Hello All,
I am trying to test a range of values in a cell:

if(and("a1" is 0 to 10, "Jack"), if("a1" is 10001 to 11000, "Jim),
if("a1" is 11000 to 12000, "Joe')

Can anyone give me the correct systax or any other way to test this?
Thank you
Syed


--
saziz
------------------------------------------------------------------------
saziz's Profile:

http://www.excelforum.com/member.php...fo&userid=6350
View this thread: http://www.excelforum.com/showthread...hreadid=475212



saziz


Thank you Aladin & RD.
Syed


--
saziz
------------------------------------------------------------------------
saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350
View this thread: http://www.excelforum.com/showthread...hreadid=475212



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com