Merging five colums but do not merge if row contains two values

0

I have 5 columns all with numeric data in. R S T U V
Table

The first three columns can be seen here so you get the idea. I want to merge them all into the first column "R" - in the vast majority of cases there is only one piece of data in each row, in either R S T U or V. But for some, there will be data in 2 columns. I want to merge them all into one column, but for rows with 2 sets of data in, I don't want them merged, I want that 2nd value put ideally in column "S", or just kept in its original column.

Jade Connor

Posted 2015-08-25T20:43:38.787

Reputation: 29

When you say "merge," you mean "move data one column to the left to if the cell to the left is empty," right? Do you need to do this once, or set up the sheet to automatically do it over and over with new data sets? – Adam – 2015-08-25T21:37:30.577

Add another picture to show how your final result should look like – Prasanna – 2015-08-26T09:42:26.737

Answers

0

In column W put the value of col R if it is non empty otherwise the value of col S if it is non empty otherwise the value of col T otherwise col U otherwise col V :

=IF(R2="";IF(S2="";IF(T2="";IF(U2="";V2;U2);T2);S2);R2)

In column X put the value of col R if it is non empty, otherwise put the concatenated value of columns S, T, U and V :

=IF(R2<>"";S2&T2&U2&V2;"")

user2955677

Posted 2015-08-25T20:43:38.787

Reputation: 36

2Welcome to Super User! While this may answer the question, it would be a better answer if you could provide some explanation why it does so. – DavidPostill – 2015-08-26T11:35:11.150

So may I completely rewrite the answer or should I post another answer ? – user2955677 – 2015-08-26T13:51:29.240

It's already much better ;) – DavidPostill – 2015-08-26T13:54:06.580

Found this which worked best: Select the whole range of column C. Press control+G (goto) Press alt+S (special) Press k (blanks) Press enter (ok) Press the equals sign Press the left arrow on the keyboard Press control+enter – Jade Connor – 2015-08-28T16:04:27.993