I have an excel formula, which is supposed to work but returns #VALUE and I cannot figure out why.
I have this table:
A B
1 | | |
2 | Oranges | 1 |
3 | Apples | 2 |
4 | Grapes | 3 |
5 | Oranges | 4 |
6 | Apples | 5 |
7 | Grapes | 6 |
8 | Apples | 7 |
I want to Check for matching values in Column A like "Apples", "Oranges", etc. and return all the corresponding values from Column B in one row:
The output should be like this but I only get #VALUE:
A B C D
11 | Apples | 2 | 5 | 7 |
12 | Oranges | 1 | 4 | #NUM|
This is the formula:
=INDEX($B$2:$B$8, SMALL(IF($A$11=$A$2:$A$8, ROW($A$2:$A$8)-ROW($A$2)+1), COLUMN(A1)))