IF.., AND.., OR.., Statement

roughleg

Board Regular
Joined
Jun 21, 2004
Messages
181
Two copies of my first post came up and I deleted one by now both are gone, so here it goes again.
I need to return the values in different ranges based on the results of the following match. If the result is between 1 and 3 then return Z1, if the result is between 4 and 9 then return X1, if the result is greater than 10 then return Y1. If tried several if statements and I can't seem to make them work.
=INDEX($A$2:$K$275,MATCH($W$1,$A$2:$A$275,0),10)
Thanks,
Skip
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

texasalynn

Well-known Member
Joined
May 19, 2002
Messages
8,458
try this
Code:
=IF(AND(A1>0,A1<4),Z1,IF(AND(A1>3,A1<10),X1,IF(Y1>9,Y1,"not")))
 

roughleg

Board Regular
Joined
Jun 21, 2004
Messages
181
Well, I was trying to do it all in one statement, but I can see how I can get what with you example.
Thanks,
Skip
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Assuming your result in A1, perhaps:

=INDEX(X1:Z1,,LOOKUP(A1,{1,3;4,1;10,2}))
 

Von Pookie

MrExcel MVP
Joined
Feb 17, 2002
Messages
13,686
Two copies of my first post came up and I deleted one by now both are gone, so here it goes again.
That was me, sorry about that. I locked and deleted one, and apparently you deleted the other one in the meantime. But I couldn't remember the username of who had posted it to let them (you) know about the mixup. :oops:
 

Watch MrExcel Video

Forum statistics

Threads
1,114,041
Messages
5,545,685
Members
410,697
Latest member
srishtijain0708
Top