It might be easier to understand if you can see a graphic depiction of what's happening.
Let's assume we have this data:
Sheet1
<table style="padding-right: 2pt; padding-left: 2pt; font-size: 10pt; font-family: Verdana,Arial; background-color: rgb(255, 255, 255);" border="0" cellpadding="0" cellspacing="0"><colgroup><col style="font-weight: bold; width: 30px;"><col style="width: 37px;"><col style="width: 37px;"><col style="width: 37px;"></colgroup><tbody><tr style="font-weight: bold; font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;"><td>
</td><td>A</td><td>B</td><td>C</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">2</td><td style="border: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-right: 1px solid rgb(0, 0, 0); border-width: 1px; border-top: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">F</td><td style="border-right: 1px solid rgb(0, 0, 0); border-width: 1px; border-top: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Bill</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">3</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">I</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">C</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Sue</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">4</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">G</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Tom</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">5</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">K</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">D</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Amy</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">6</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Tim</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">7</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">K</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Joe</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">8</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">B</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">G</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Lisa</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">9</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">K</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">D</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Bob</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">10</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">B</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Sam</td></tr></tbody></table>
We want to find the name in column C where both column A = A and column B = A.
This would be the formula we use:
Array entered**:
=INDEX(C2:C10,MATCH(1,IF(A2:A10="A",IF(B2:B10="A",1)),0))
** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
The answer we want will correspond to the position of our lookup_value of 1.
Here's how we get there.
First we test column A to see if the cells contain "A":
This expression will return either TRUE or FALSE:
IF(A2:A10="A"
Sheet1
<table style="padding-right: 2pt; padding-left: 2pt; font-size: 10pt; font-family: Verdana,Arial; background-color: rgb(255, 255, 255);" border="0" cellpadding="0" cellspacing="0"><colgroup><col style="font-weight: bold; width: 30px;"><col style="width: 37px;"><col style="width: 37px;"><col style="width: 101px;"><col style="width: 37px;"></colgroup><tbody><tr style="font-weight: bold; font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;"><td>
</td><td>A</td><td>B</td><td>C</td><td>D</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">1</td><td style="border: 1px solid rgb(0, 0, 0); color: rgb(255, 255, 255); text-align: center;">_</td><td style="border-right: 1px solid rgb(0, 0, 0); border-width: 1px; border-top: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); color: rgb(255, 255, 255); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">_</td><td style="border-right: 1px solid rgb(0, 0, 0); border-width: 1px; border-top: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">IF A2:A10 = A</td><td style="border-right: 1px solid rgb(0, 0, 0); border-width: 1px; border-top: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); color: rgb(255, 255, 255); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">_</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">2</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">F</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">TRUE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Bill</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">3</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">I</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">C</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Sue</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">4</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">G</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Tom</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">5</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">K</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">D</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Amy</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">6</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">TRUE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Tim</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">7</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">K</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">TRUE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Joe</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">8</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">B</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">G</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Lisa</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">9</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">K</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">D</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Bob</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">10</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">B</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Sam</td></tr></tbody></table>
Then we test column B to see if the cells contain "A".
This expression will return either TRUE or FALSE:
IF(B2:B10="A"
Sheet1
<table style="padding-right: 2pt; padding-left: 2pt; font-size: 10pt; font-family: Verdana,Arial; background-color: rgb(255, 255, 255);" border="0" cellpadding="0" cellspacing="0"><colgroup><col style="font-weight: bold; width: 30px;"><col style="width: 37px;"><col style="width: 37px;"><col style="width: 101px;"><col style="width: 99px;"><col style="width: 37px;"></colgroup><tbody><tr style="font-weight: bold; font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;"><td>
</td><td>A</td><td>B</td><td>C</td><td>D</td><td>E</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">1</td><td style="border: 1px solid rgb(0, 0, 0); color: rgb(255, 255, 255); text-align: center;">_</td><td style="border-right: 1px solid rgb(0, 0, 0); border-width: 1px; border-top: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); color: rgb(255, 255, 255); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">_</td><td style="border-right: 1px solid rgb(0, 0, 0); border-width: 1px; border-top: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">IF A2:A10 = A</td><td style="border-right: 1px solid rgb(0, 0, 0); border-width: 1px; border-top: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">IF B2:B10 = A</td><td style="border-right: 1px solid rgb(0, 0, 0); border-width: 1px; border-top: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); color: rgb(255, 255, 255); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">_</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">2</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">F</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">TRUE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Bill</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">3</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">I</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">C</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Sue</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">4</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">G</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">TRUE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Tom</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">5</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">K</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">D</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Amy</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">6</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">TRUE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">TRUE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Tim</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">7</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">K</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">TRUE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Joe</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">8</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">B</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">G</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Lisa</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">9</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">K</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">D</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Bob</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">10</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">B</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">TRUE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Sam</td></tr></tbody></table>
The way we have the nested IFs structured, they evaluate like this...
IF A2 = A and B2 = A, return 1, otherwise return FALSE
IF A3 = A and B3 = A, return 1, otherwise return FALSE
IF A4 = A and B4 = A, return 1, otherwise return FALSE
IF A5 = A and B5 = A, return 1, otherwise return FALSE
IF A6 = A and B6 = A, return 1, otherwise return FALSE
IF A7 = A and B7 = A, return 1, otherwise return FALSE
IF A8 = A and B8 = A, return 1, otherwise return FALSE
IF A9 = A and B9 = A, return 1, otherwise return FALSE
IF A10 = A and B10 = A, return 1, otherwise return FALSE
Sheet1
<table style="padding-right: 2pt; padding-left: 2pt; font-size: 10pt; font-family: Verdana,Arial; background-color: rgb(255, 255, 255);" border="0" cellpadding="0" cellspacing="0"><colgroup><col style="font-weight: bold; width: 30px;"><col style="width: 37px;"><col style="width: 37px;"><col style="width: 101px;"><col style="width: 99px;"><col style="width: 184px;"><col style="width: 37px;"></colgroup><tbody><tr style="font-weight: bold; font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;"><td>
</td><td>A</td><td>B</td><td>C</td><td>D</td><td>E</td><td>F</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">1</td><td style="border: 1px solid rgb(0, 0, 0); color: rgb(255, 255, 255); text-align: center;">_</td><td style="border-right: 1px solid rgb(0, 0, 0); border-width: 1px; border-top: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); color: rgb(255, 255, 255); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">_</td><td style="border-right: 1px solid rgb(0, 0, 0); border-width: 1px; border-top: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">IF A2:A10 = A</td><td style="border-right: 1px solid rgb(0, 0, 0); border-width: 1px; border-top: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">IF B2:B10 = A</td><td style="border-right: 1px solid rgb(0, 0, 0); border-width: 1px; border-top: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">IF A2:A10 and B2:B10 = A</td><td style="border-right: 1px solid rgb(0, 0, 0); border-width: 1px; border-top: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); color: rgb(255, 255, 255); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">_</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">2</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">F</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">TRUE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Bill</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">3</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">I</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">C</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Sue</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">4</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">G</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">TRUE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Tom</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">5</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">K</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">D</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Amy</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">6</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">TRUE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">TRUE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">1</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Tim</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">7</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">K</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">TRUE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Joe</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">8</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">B</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">G</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Lisa</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">9</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">K</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">D</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Bob</td></tr><tr style="height: 17px;"><td style="font-size: 8pt; background-color: rgb(202, 202, 202); text-align: center;">10</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-left: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">B</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">A</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">TRUE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">FALSE</td><td style="border-width: 1px; border-right: 1px solid rgb(0, 0, 0); border-color: rgb(0, 0, 0); border-bottom: 1px solid rgb(0, 0, 0); text-align: center;">Sam</td></tr></tbody></table>
The results of the two nested IF functions then become the lookup_array in the MATCH function.
So, we want to find the location of the lookup_value 1 within the lookup_array:
=INDEX(C2:C10,MATCH(1,{FALSE;FALSE;FALSE;FALSE;1;FALSE;FALSE;FALSE;FALSE},0))
The lookup_value 1 is found at position 5 of the lookup_array. This value is then passed to the INDEX function:
=INDEX(C2:C10,5)
Return the value at positon 5 from the range C2:C10:
C2 = position 1
C3 = position 2
C4 = position 3
C5 = position 4
C6 = position 5
C7 = position 6
C8 = position 7
C9 = position 8
C10 = position 9
Position 5 = C6, C6 = Tim
So, the array formula:
=INDEX(C2:C10,MATCH(1,IF(A2:A10="A",IF(B2:B10="A",1)),0))
Returns: Tim