Combine three columns into one
-
- 5StarLounger
- Posts: 627
- Joined: 03 Feb 2010, 15:02
Combine three columns into one
I have three columns that I would like to combine into one. I want the column with data to fill the 4th column. One of the 3 columns has data and the other two don't per row so I just want one column to reflect all 3 columns. The columns are E, F and G and I want H to have all three. How would I formulate an IF statement for this?
-
- Administrator
- Posts: 78492
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Combine three columns into one
For text values, you can simply concatenate: if your data start in row 1, try the following formula in H1
=E1&F1&G1
and fill down.
For numeric or date values, try
=IF(ISBLANK(E1),IF(ISBLANK(F1),G1,F1),E1)
If columns E, F and G contain dates, you'll have to format column H as a date too.
=E1&F1&G1
and fill down.
For numeric or date values, try
=IF(ISBLANK(E1),IF(ISBLANK(F1),G1,F1),E1)
If columns E, F and G contain dates, you'll have to format column H as a date too.
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 627
- Joined: 03 Feb 2010, 15:02
Re: Combine three columns into one
I looked at the data closer and this is what I need. The data is text. I need what is in Column E if it is not blank. If it is blank then I need what is in one of the other columns - the one that has data. I always need column E if not blank. If column E has data and say column G has data, then I need column E always. I was finding that column E and G had data on the same row sometimes.
I just need column E and the other two columns only when E is blank. Hope this makes sense.
I just need column E and the other two columns only when E is blank. Hope this makes sense.
-
- Administrator
- Posts: 78492
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Combine three columns into one
Does this do what you want?
=IF(ISBLANK(E1),IF(ISBLANK(F1),G1,F1),E1)
=IF(ISBLANK(E1),IF(ISBLANK(F1),G1,F1),E1)
Best wishes,
Hans
Hans
-
- 3StarLounger
- Posts: 392
- Joined: 25 Jan 2010, 12:21
Re: Combine three columns into one
If 2 are blank and only 1 has numeric data, you could just use:
=Sum(E1:G1)
Steve
=Sum(E1:G1)
Steve
-
- Administrator
- Posts: 78492
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Combine three columns into one
That's much simpler for numeric values, and it works for dates too if only one column is filled in each row.
Best wishes,
Hans
Hans