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

#### roughleg

##### Board Regular
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

### Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
try this
Code:
``=IF(AND(A1>0,A1<4),Z1,IF(AND(A1>3,A1<10),X1,IF(Y1>9,Y1,"not")))``

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

Assuming your result in A1, perhaps:

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

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.

Replies
8
Views
515
Replies
6
Views
1K
Replies
5
Views
318
Replies
4
Views
308
Replies
6
Views
137

1,216,497
Messages
6,130,990
Members
449,612
Latest member
geniusufo007

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back