I am looking for a formula that will take all non-blank values in one column and stack them in another column.
Please see example below. Essentially I am trying to go from column A to B using a formula:
| A | B | |
|---|---|---|
| 1 | Apple | Apple |
| 2 | Orange | |
| 3 | Orange | Lemon |
| 4 | Lemon | Pear |
| 5 | Banana | |
| 6 | ||
| 7 | Pear | |
| 8 | ||
| 9 | Banana |
I have tried the following formula, but it seems to only replicate column A.
=IFERROR(INDEX($A$1:$A$9,SMALL(IF($A$1:$A$9<>"",ROW($A$1:$A$9)-ROW($A$1)+1),ROWS($A$1:$A1))),"")
Any ideas on how to tackle this?
UPDATE: turns out the formula above works fine. Column A was auto-generated using an IF formula where any false condition would return a " ". It should have been "".