# How to merge two Excel columns into one?

Let's say we have two columns/ranges `A1:A10` (group A) and `B5:B50` (group B) and we need to merge the two into one column in `C1:C60` (60 in C = 10 from A + 50 from B)

Data in group A & group B can go up/down unpredictable.

I google and found this trick but that works on constant number of cells of each group.

How would we merge such dynamic ranges quickly?

-
What is the issue? Is it that you want new entries into list 1 to arrive above the list 2 entries in the new list? –  Raystafarian Mar 24 '12 at 11:51
@Raystafarian Yes it is. –  Nam G VU Mar 24 '12 at 17:11

This is the simplest way I would do that with just a formula.... if the values are in columns A and B, then this formula in C1, then copied down as far as you want, it will show blanks when the values run out:

=IF(ROW()<=COUNTA(A:A), INDEX(A:A,ROW()), IF(ROW()>COUNTA(A:B), "", INDEX(B:B,ROW()-COUNTA(A:A))))

-
This is great :-). Note that the formula assumes that there are no blank cells in column A: For example, if A3 was empty, COUNTA(A:A) would return 3 and the function would therefore ignore the data in A4. –  Jonas Heidelberg Feb 1 '13 at 8:08