Formula with multiple conditions

rob1987

New Member
Joined
Feb 14, 2011
Messages
39
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.

Can anybody please help?

Much appreciated, thank you!
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
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.
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top