I'm trying to create a single list of serial numbers associated with multiple customer account IDs.
Example: Using the data set below, I need a formula that produces a single list of serial numbers associated with ALL of the following account IDs: ABC, GHI and STU.
The formula should produce the following output in cell D2:D7...
001
002
005
006
013
014
[TABLE="class: grid, width: 400, align: left"]
<tbody>[TR]
[TD]Account ID (cell A1)[/TD]
[TD]Serial Number (cell B1)[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]001[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]002[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]003[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]004[/TD]
[/TR]
[TR]
[TD]GHI[/TD]
[TD]005[/TD]
[/TR]
[TR]
[TD]GHI[/TD]
[TD]006[/TD]
[/TR]
[TR]
[TD]JKL[/TD]
[TD]007[/TD]
[/TR]
[TR]
[TD]JKL[/TD]
[TD]008[/TD]
[/TR]
[TR]
[TD]MNO[/TD]
[TD]009[/TD]
[/TR]
[TR]
[TD]MNO[/TD]
[TD]010[/TD]
[/TR]
[TR]
[TD]PQR[/TD]
[TD]011[/TD]
[/TR]
[TR]
[TD]PQR[/TD]
[TD]012[/TD]
[/TR]
[TR]
[TD]STU[/TD]
[TD]013[/TD]
[/TR]
[TR]
[TD]STU[/TD]
[TD]014[/TD]
[/TR]
[TR]
[TD]VWX[/TD]
[TD]015[/TD]
[/TR]
[TR]
[TD]VWX[/TD]
[TD]016[/TD]
[/TR]
</tbody>[/TABLE]
I have the following formula but it only gets me a list based on any ONE account ID. I have not been able to find one that works for multiple account IDs.
{=IFERROR(INDEX($B$2:$B$25|SMALL(IF($A$2:$A$25="ABC"|ROW($B$2:$B$25)-ROW($B$2)+1)|ROWS(D$2:D2)))|"")}
Thank you!
Example: Using the data set below, I need a formula that produces a single list of serial numbers associated with ALL of the following account IDs: ABC, GHI and STU.
The formula should produce the following output in cell D2:D7...
001
002
005
006
013
014
[TABLE="class: grid, width: 400, align: left"]
<tbody>[TR]
[TD]Account ID (cell A1)[/TD]
[TD]Serial Number (cell B1)[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]001[/TD]
[/TR]
[TR]
[TD]ABC[/TD]
[TD]002[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]003[/TD]
[/TR]
[TR]
[TD]DEF[/TD]
[TD]004[/TD]
[/TR]
[TR]
[TD]GHI[/TD]
[TD]005[/TD]
[/TR]
[TR]
[TD]GHI[/TD]
[TD]006[/TD]
[/TR]
[TR]
[TD]JKL[/TD]
[TD]007[/TD]
[/TR]
[TR]
[TD]JKL[/TD]
[TD]008[/TD]
[/TR]
[TR]
[TD]MNO[/TD]
[TD]009[/TD]
[/TR]
[TR]
[TD]MNO[/TD]
[TD]010[/TD]
[/TR]
[TR]
[TD]PQR[/TD]
[TD]011[/TD]
[/TR]
[TR]
[TD]PQR[/TD]
[TD]012[/TD]
[/TR]
[TR]
[TD]STU[/TD]
[TD]013[/TD]
[/TR]
[TR]
[TD]STU[/TD]
[TD]014[/TD]
[/TR]
[TR]
[TD]VWX[/TD]
[TD]015[/TD]
[/TR]
[TR]
[TD]VWX[/TD]
[TD]016[/TD]
[/TR]
</tbody>[/TABLE]
I have the following formula but it only gets me a list based on any ONE account ID. I have not been able to find one that works for multiple account IDs.
{=IFERROR(INDEX($B$2:$B$25|SMALL(IF($A$2:$A$25="ABC"|ROW($B$2:$B$25)-ROW($B$2)+1)|ROWS(D$2:D2)))|"")}
Thank you!