Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Combine firstt & last name

I ahve a spreadsheet were the first name and last name are in sperate colums.
I can join combine the two and copy as a value. When I combine them though
there are several extra spaces. Does anyone know what causes this and how to
fix it? here is an example:

John Smith shows as John Smith
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Combine firstt & last name

Trim function
"Jennie" wrote in message
...
I ahve a spreadsheet were the first name and last name are in sperate
colums.
I can join combine the two and copy as a value. When I combine them though
there are several extra spaces. Does anyone know what causes this and how
to
fix it? here is an example:

John Smith shows as John Smith



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Combine firstt & last name

=TRIM(A1&" "&B1)


"Jennie" wrote:

I ahve a spreadsheet were the first name and last name are in sperate colums.
I can join combine the two and copy as a value. When I combine them though
there are several extra spaces. Does anyone know what causes this and how to
fix it? here is an example:

John Smith shows as John Smith

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Combine firstt & last name

How are you joining/combining the two names?

=A1 & B1

=CONCATENATE(A1,A2)

Either method will produce spaces if you have extra spaces in the cell values.

Try =TRIM(A1 & " " & B2) to return John Smith


Gord Dibben MS Excel MVP


On Fri, 8 Jun 2007 14:50:00 -0700, Jennie
wrote:

I ahve a spreadsheet were the first name and last name are in sperate colums.
I can join combine the two and copy as a value. When I combine them though
there are several extra spaces. Does anyone know what causes this and how to
fix it? here is an example:

John Smith shows as John Smith


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Combine firstt & last name

The trim function does not neet the extra &" " in between. The definition
is: removes all spaces from a text string except for a single space between
words. Of course if you need more than one, then you would use " " but it
looks like the OP was looking for one, I am using 2007 version, don't
remember if other versions were different. So =TRIM(a1&b1)

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
How are you joining/combining the two names?

=A1 & B1

=CONCATENATE(A1,A2)

Either method will produce spaces if you have extra spaces in the cell
values.

Try =TRIM(A1 & " " & B2) to return John Smith


Gord Dibben MS Excel MVP


On Fri, 8 Jun 2007 14:50:00 -0700, Jennie

wrote:

I ahve a spreadsheet were the first name and last name are in sperate
colums.
I can join combine the two and copy as a value. When I combine them though
there are several extra spaces. Does anyone know what causes this and how
to
fix it? here is an example:

John Smith shows as John Smith






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Combine firstt & last name

Thanks Mike

Either formula produces a single spaced John Smith in Excel 2003

Yours is shorter<g


Gord

On Fri, 8 Jun 2007 21:23:08 -0400, "Mike G" wrote:

The trim function does not neet the extra &" " in between. The definition
is: removes all spaces from a text string except for a single space between
words. Of course if you need more than one, then you would use " " but it
looks like the OP was looking for one, I am using 2007 version, don't
remember if other versions were different. So =TRIM(a1&b1)

"Gord Dibben" <gorddibbATshawDOTca wrote in message
.. .
How are you joining/combining the two names?

=A1 & B1

=CONCATENATE(A1,A2)

Either method will produce spaces if you have extra spaces in the cell
values.

Try =TRIM(A1 & " " & B2) to return John Smith


Gord Dibben MS Excel MVP


On Fri, 8 Jun 2007 14:50:00 -0700, Jennie

wrote:

I ahve a spreadsheet were the first name and last name are in sperate
colums.
I can join combine the two and copy as a value. When I combine them though
there are several extra spaces. Does anyone know what causes this and how
to
fix it? here is an example:

John Smith shows as John Smith




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
how to combine........ pathan Excel Discussion (Misc queries) 1 August 7th 06 09:39 AM
How Can i combine Monty Excel Discussion (Misc queries) 5 July 25th 06 09:28 PM
Combine into one please Steved Excel Worksheet Functions 1 August 26th 05 02:04 AM
How do I combine IF and OR? ana_15825 - ExcelForums.com Excel Worksheet Functions 6 June 30th 05 04:51 AM
Combine into one please. Steved Excel Worksheet Functions 2 February 22nd 05 11:46 PM


All times are GMT +1. The time now is 09:35 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"