Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Two cells into one

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Two cells into one


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


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default Two cells into one

"Steve Wylie" wrote in message
...
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


  #4   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 95
Default Two cells into one

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


"Steve Wylie" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel: match two cells in one sheet to two cells in another and return a third cells value Spence Excel Worksheet Functions 3 February 13th 11 05:33 AM
compare 2 column cells and return the adjacent columns cells data of the cell trebor57 Excel Worksheet Functions 1 February 1st 11 02:54 PM
join data in multiple cells when adjoining cells match criteria ?? angiec50 Excel Worksheet Functions 1 October 6th 09 10:27 AM
Setting of input cells as blue font and formula cells as black fon Sunnyskies Excel Discussion (Misc queries) 2 May 14th 07 05:27 PM
trying to create an (almost) circular formula between cells and data validated cells with lists KR Excel Worksheet Functions 0 May 12th 05 07:21 PM


All times are GMT +1. The time now is 02:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"