# combine multiple cells but with differing amounts of data in them

#### tonywatsonhelp

##### Well-known Member
Hi Everyone,
I've got a bit of a problem not sure how to fix,

I need to combine the data from cells D,E,F,G & H into cell C
now this would be easy but I want a comer space ", " between each piece of data, again, would be easy but some row only have one cell with data others have all 5, so if I use the =D1&", "&E1&so on formula in get "Dave,,,,," for example
is there a way to do this so if the cells are empty I don't get lots of comers next to each other?

thanks

Tony

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.
I only did it for 3 columns, but you can extend.
Excel Workbook
ABCDEF
1JoeMeHori**Joe, Me, Hori
2Joe*Hori**Joe, Hori
3JoeMe***Joe, Me
Sheet4

Excellent, thank you, I was trying to do an if but mine was getting way out of hand this is a lot better, thank you

You're welcome. You may need to modify if the first column could be empty, but data in other columns.
My formula will return ", me" if Joe isn't there

Replies
10
Views
673
Replies
4
Views
549
Replies
5
Views
764
Replies
5
Views
535
Replies
1
Views
557

1,196,231
Messages
6,014,138
Members
441,805
Latest member
rwm

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back