Monday 3 September 2018

How do I 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?



Answer



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))))


enter image description here


No comments:

Post a Comment

Where does Skype save my contact&#39;s avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...