Two cells into one

  • Thread starter Thread starter Steve Wylie
  • Start date Start date
S

Steve Wylie

I have a spreadsheet with, amongst other things, two
columns filled with people's names. They are in the
format FirstName, LastName, so for instance column A
contains "John" and column B contains "Smith".

I need to create a new column with "John Smith" in. And
the same for all the records down the whole sheet. In
other words a cell combining the values of the first two
to create the whole person's name.

I tried this with a formula but due to my limited
knowledge of Excel, it didn't work. (=A1 + " " + B1).

Can this be done with a formula or do I need a macro to
take the value of one cell, add a space and add it to the
value of another, then put the resultant into a third
cell?

Thanks for any help anyone can give.

Steve Wylie
 
A1 = John

B1 = Smith


C1=A1&" "&B1

C1 will show John Smith


If it was an address and you wanted to put 45 Brown Street, Your Town
(note the ,) you would put the , between the ", "


Regards
 
Steve Wylie said:
I have a spreadsheet with, amongst other things, two
columns filled with people's names. They are in the
format FirstName, LastName, so for instance column A
contains "John" and column B contains "Smith".

I need to create a new column with "John Smith" in. And
the same for all the records down the whole sheet. In
other words a cell combining the values of the first two
to create the whole person's name.

I tried this with a formula but due to my limited
knowledge of Excel, it didn't work. (=A1 + " " + B1).

Can this be done with a formula or do I need a macro to
take the value of one cell, add a space and add it to the
value of another, then put the resultant into a third
cell?

Thanks for any help anyone can give.

Steve Wylie

You were almost correct!
=A1&" "&B1
 
Steve,

You're close. Use the & operator instead of +. E.g.,

=A1&" "&B1


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Back
Top