• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

Excel - Formatting Concatenation of Cells

Hi

Is there a way to combine cell contents across a row to be merged into one? For example:

A1: 2800
B1: 2345
C1:78598

Usually, I would create a formula:

"A1" & " " & "B1" & " " & "C1" to be merged into one cell that contains the formula:

D1: 2800 2345 78598

Please note the space between each cell content. The nuance is that the number of cells to be combined is variable.

Thank you
0
tahirih
Asked:
tahirih
1 Solution
 
barry houdiniCommented:
There's no simple way to concatenate a range (without VBA) without adding each cell separately, assuming a maximum of 5 values with no spaces in the cells you could do this

=TRIM(A1&" "&B1&" "&C1&" "&D1&" "&E1)

TRIM removes any excess spaces....

regards, barry
0
 
tahirihAuthor Commented:
Can you please offer a VBA solution?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now