# Making one column out of two columns where either one of them contains numbers

1. ## Making one column out of two columns where either one of them contains numbers

Hi guys!

So, I have column A and column B. Both columns contain numbers. For each row under these separate columns, it's either
the cell under column A that contains a number or a cell under column B, meaning that they don't contain data at the same time. For some
rows, both cells are empty, this is the only exception. Now I have to make one column out of those two columns without losing data, how do I do this?

Help is so appreciated man!!!!!!! I am really stuck edit.PNG  Register To Reply

2. ## Re: Making one column out of two columns where either one of them contains numbers

Your first row of data shows two numbers, but you say in your narrative that this cannot happen. Which is it to be?

Pete  Register To Reply

3. ## Re: Making one column out of two columns where either one of them contains numbers

Thank you for noticing, I removed that one and added another screenshot. There wasn't supposed to be data there  Register To Reply

4. ## Re: Making one column out of two columns where either one of them contains numbers

Put this formula in C1:

=COUNTIF(A\$1:B1,"<>")

then copy down to the bottom of your list of numbers. Then you can use this formula in E1:

=IFERROR(INDEX(A:A,MATCH(ROWS(\$1:1),C:C,0))+INDEX(B:B,MATCH(ROWS(\$1:1),C:C,0)),"")

Copy down until you start to get blanks.

Note that you may need to use semicolons ( ; ) instead of commas ( , ) in the formulae, depending on your regional settings.

Hope this helps.

Pete  Register To Reply