# Formula with multiple conditions

#### rob1987

##### New Member
Hello,

Please can somebody help me structure my formula? I currently use the following formula to look up a value dependent on the what text is contained within cells b1 + c1. :

{=INDEX('Feb 11'!S822:S835,MATCH(example!B1&example!C1,'Feb 11'!F822:F841 &'Feb 11'!G822:G841,0))} (I'll call this formula A)

I want to edit it so that the above formula is used if both b1 + c1 contain text, but...

{=INDEX('Feb 11'!S822:S835,MATCH(example!B1,'Feb 11'!F822:F841 &'Feb 11'!,0))} (I'll call this formula B)

is used if only B1 conatins text and c1 is blank, or...

{=INDEX('Feb 11'!S822:S835,MATCH(example!C1,'Feb 11'!G822:G841,0))}
(I'll call this formula C)

is used if b1 is blank and c1 contains text.

I assume my formula will have to take the Form of: IF B1 and C1 contain text, then use formula A, If C1 is blank then use Formula B, if B1 is blank then use formula C. But I have no idea how to make this into a formula.

Much appreciated, thank you!

### Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Maybe something like this . . .
Code:
``````=if(and(istext(b1),istext(c1)),[formula A],if(and(istext(b1),isblank(c1)),
[formula B],if(istext(c1),[formula C],[formula D])))``````

I haven't tested this, but I think it should work like this
b1 is text, c1 is text, formula A
b1 is text, c1 is blank, formula B
b1 is blank, c1 is text, formula C
b1 is blank, c1 is blank, formula D

I haven't done any analysis of your formulas to see if they can be improved on.

Replies
0
Views
269
Replies
10
Views
364
Replies
1
Views
132
Replies
1
Views
139
Replies
11
Views
299

1,216,084
Messages
6,128,730
Members
449,465
Latest member
TAKLAM

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