Hi All, I've run into a similar challenge trying to return multiple corresponding values from multiple lookup values (with duplicates). Here's a dataset:
Excel 2010
| A | B | C |
---|
Record ID | Sketch # | Sum of Mango Accepted | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
<tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]511010027[/TD]
[TD="align: right"]3223[/TD]
[TD="align: right"]7[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]511010033[/TD]
[TD="align: right"]322[/TD]
[TD="align: right"]6[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]511020065[/TD]
[TD="align: right"]8823[/TD]
[TD="align: right"]9[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]511020065[/TD]
[TD="align: right"]8842[/TD]
[TD="align: right"]16[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]511020065[/TD]
[TD="align: right"]8843[/TD]
[TD="align: right"]8[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]511020077[/TD]
[TD="align: right"]8845[/TD]
[TD="align: right"]11[/TD]
[TD="align: center"]8[/TD]
[TD="align: right"]511020086[/TD]
[TD="align: right"]3168[/TD]
[TD="align: right"]5[/TD]
</tbody>
Sheet2
Effectively, I want to lookup the values in Column A and return the corresponding values in Columns B and C horizontally following this format:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]
recordID
[/TD]
[TD]
sketch#1[/TD]
[TD]
mangoaccepted1[/TD]
[TD]
sketch#2[/TD]
[TD]
mangoaccepted2[/TD]
[TD]
sketch#3[/TD]
[TD]
mangoaccepted3[/TD]
[/TR]
</tbody>[/TABLE]
I've tried the array: =INDEX($B$2:$B$8, SMALL(IF($A2=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(A1))) which will only return the values from Column B.
Excel 2010
| A | B | C | D | E | F | G |
---|
recordId_key | sketch#1 | mangoaccepted1 | sketch#2 | mangoaccepted2 | sketch#3 | mangoaccepted3 | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
<tbody>
[TD="align: center"]11[/TD]
[TD="align: center"]12[/TD]
[TD="align: right"]511010027[/TD]
[TD="align: right"]3223[/TD]
[TD="align: right"]#NUM![/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]13[/TD]
[TD="align: right"]511010033[/TD]
[TD="align: right"]322[/TD]
[TD="align: right"]#NUM![/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]14[/TD]
[TD="align: right"]511020065[/TD]
[TD="align: right"]8823[/TD]
[TD="align: right"]8842[/TD]
[TD="align: right"]8843[/TD]
[TD="align: right"]#NUM![/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]15[/TD]
[TD="align: right"]511020065[/TD]
[TD="align: right"]8823[/TD]
[TD="align: right"]8842[/TD]
[TD="align: right"]8843[/TD]
[TD="align: right"]#NUM![/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]16[/TD]
[TD="align: right"]511020065[/TD]
[TD="align: right"]8823[/TD]
[TD="align: right"]8842[/TD]
[TD="align: right"]8843[/TD]
[TD="align: right"]#NUM![/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]17[/TD]
[TD="align: right"]511020077[/TD]
[TD="align: right"]8845[/TD]
[TD="align: right"]#NUM![/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]18[/TD]
[TD="align: right"]511020086[/TD]
[TD="align: right"]3168[/TD]
[TD="align: right"]#NUM![/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
</tbody>
Sheet2
[TABLE="width: 85%"]
<tbody>[TR]
[TD]
Array Formulas[TABLE="width: 100%"]
<tbody>[TR="bgcolor: #DAE7F5"]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]D14[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A4=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(C3)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]E14[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A4=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(D3)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]D15[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A5=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(C4)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]E15[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A5=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(D4)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]D16[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A6=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(C5)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]E16[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A6=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(D5)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]B12[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A2=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(A1)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]C12[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A2=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(B1)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]B13[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A3=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(A2)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]C13[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A3=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(B2)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]B14[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A4=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(A3)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]C14[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A4=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(B3)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]B15[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A5=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(A4)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]C15[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A5=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(B4)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]B16[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A6=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(A5)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]C16[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A6=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(B5)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]B17[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A7=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(A6)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]C17[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A7=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(B6)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]B18[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A8=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(A7)))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]C18[/TH]
[TD="align: left"]{=INDEX(
$B$2:$B$8, SMALL(IF($A8=$A$2:$B$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), COLUMN(B7)))}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]
I've tried the array: =INDEX($A$2:$C$8, SMALL(IF($A2=$A$2:$A$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), ROW(A1)),COLUMN(A1)) which will return the values from both Columns B and C but will not allow me to copy+paste (or drag) the formula down Column A.
Excel 2010
| A | B | C | D | E | F | G |
---|
recordId_key | sketch#1 | mangoaccepted1 | sketch#2 | mangoaccepted2 | sketch#3 | mangoaccepted3 | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
<tbody>
[TD="align: center"]20[/TD]
[TD="align: center"]21[/TD]
[TD="align: right"]511010027[/TD]
[TD="align: right"]3223[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]#REF![/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]22[/TD]
[TD="align: right"]#NUM![/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: center"]23[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
</tbody>
Sheet2
[TABLE="width: 85%"]
<tbody>[TR]
[TD]
Array Formulas[TABLE="width: 100%"]
<tbody>[TR="bgcolor: #DAE7F5"]
[TH]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]A21[/TH]
[TD="align: left"]{=INDEX(
$A$2:$C$8, SMALL(IF($A2=$A$2:$A$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), ROW(A1)),COLUMN(A1))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]B21[/TH]
[TD="align: left"]{=INDEX(
$A$2:$C$8, SMALL(IF($A2=$A$2:$A$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), ROW(B1)),COLUMN(B1))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]C21[/TH]
[TD="align: left"]{=INDEX(
$A$2:$C$8, SMALL(IF($A2=$A$2:$A$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), ROW(C1)),COLUMN(C1))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]D21[/TH]
[TD="align: left"]{=INDEX(
$A$2:$C$8, SMALL(IF($A2=$A$2:$A$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), ROW(D1)),COLUMN(D1))}[/TD]
[/TR]
[TR]
[TH="bgcolor: #DAE7F5"]A22[/TH]
[TD="align: left"]{=INDEX(
$A$2:$C$8, SMALL(IF($A3=$A$2:$A$8, ROW($A$2:$A$8)-MIN(ROW($A$2:$A$8))+1, ""), ROW(A2)),COLUMN(A2))}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]
I'm sure I'm missing just one piece of the puzzle but any help will be greatly appreciated...thanks!