Using two IF AND statements for two conditions each

BeadyBob

New Member
Joined
Feb 12, 2018
Messages
22
Office Version
  1. 365
Platform
  1. Windows
Hello,
I am trying to pull a result that has two conditions but I need it to do this twice based on what value is found in the first condition.
If C4 is the same as R8 and M7 has Henderson listed, pull R12, otherwise pull W12.
If C4 instead is the same as T8 and M7 has Henderson listed, pull T12, otherwise pull Y12

=IF(AND($C$4=$R$8,$M$7="Henderson"),R12,W12,(if(AND($C$4=$T$8,$M$7="Henderson"),T12,Y12)))

It's not working. If there is a fix to this formula or a suggestion for a better formula, I would really appreciate the help.
Thanks so much.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Thank you for asking. I may be trying to do something that can't be done. Within the same formula (same cell for result) I am trying to.

1) C4 = R8 and M7 = Henderson (both are true) return R12 (if first criteria true but second is not return W12)
2) C4 = T8 and M7 = Henderson (both are true) return T12 (if first criteria true but second is not return Y12)
 
Upvote 0
I understood that but you didn't answer my questions. Unless you want to concatenate or sum results, you can't put both R12 AND T12 in the same cell (both true) or W12 AND Y12 in the same cell (both false)
 
Upvote 0
I see, apologies. I do not want to sum the results, they are an either one but not both.

I did not explain that C4 is a drop down where one of two choices will be selected.
Depending on which choice is selected it will change which column the result is pulled from. (result column headers include the name of the C4 dropdown)
M7 is also a dropdown with two choices. Henderson is one choice. (result column headers do no include the name of the M7 dropdown)

Thank you for your time. I do understand if this is not a logical or achievable.
 
Upvote 0
Combining the info from your 2 posts, see if this works for you:
Excel Formula:
=IF($C$4=$R$8,
      IF($M$7="Henderson",R12,W12),
      IF($C$4=$T$8,
        IF($M$7="Henderson",T12,Y12),
        ""))
 
Upvote 0
Solution
My goodness, that works beautifully. Thank you so much Alex, you untangled my confused formula and made it look easy.
 
Upvote 0
I find it easier to follow the logic if you use Alt+enter to split it across lines and spaces to indent. Glad I could help.
 
Upvote 0

Forum statistics

Threads
1,225,969
Messages
6,188,109
Members
453,460
Latest member
Cjohnson3

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