This question already has an answer here:
I have one table with parts as following;
---------------
| Part number |
---------------
| 123456 |
| 16D345 |
| 16E099 |
| 490586 |
| 970884 |
---------------
And another one like so;
---------------------------------------------------
| Part number | 940822 | 940922 | 170345 | 940222 |
---------------------------------------------------
| 123456 | X | | X | X |
| 16D345 | X | | X | |
| 16E099 | | X | | X |
| 490586 | X | | X | X |
| 970884 | | | X | |
---------------------------------------------------
The numbers in columns of the second table are 'units'.
I'm trying to figure out how to get all the unit numbers where a part has X. Basically I want to end up with the following;
----------------------------------------
| Part number | Used in |
----------------------------------------
| 123456 | 940822, 170345, 940222 |
| 16D345 | 940822, 170345 |
| 16E099 | 940922, 940222 |
| 490586 | 940822, 170345, 940222 |
| 970884 | 170345 |
----------------------------------------
Now I've just recently learned how to use INDEX and MATCH but haven't been able to get the result I want. I've tried using array formulas but I don't understand them yet.
If you have a subscription to Office 365 Excel then you can use the following array formula:
Being an array formula it needs to be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode. If done correctly then Excel will put
{}
around the formula.If you do not have Office 365 then you can put this code in a module attached to the workbook and use the formula as described above: