Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Merging three cells into one

I have four cells I want to merge into one cell.
I have used the "=A1 & " " & B1 & " " & C1 & " " & D1
to combine them into one cell - but what do I use to tell it
to not put a space if there is no middle initial or no suffix? Thanks

A1 A2 A3 A4
John D. Ameen
Kenneth E. Amos Jr.
Brett Anderson
Gregory T. Anderson

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Merging three cells into one

=A1&IF(B1="",""," "&B1)&C1&IF(D1="",""," "&D1)

Hope this helps.
--
John C


"Randi" wrote:

I have four cells I want to merge into one cell.
I have used the "=A1 & " " & B1 & " " & C1 & " " & D1
to combine them into one cell - but what do I use to tell it
to not put a space if there is no middle initial or no suffix? Thanks

A1 A2 A3 A4
John D. Ameen
Kenneth E. Amos Jr.
Brett Anderson
Gregory T. Anderson

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Merging three cells into one

or, if you like....
=TRIM(A1&" "&B1&" "&C1&" "&D1)
--
John C


"Randi" wrote:

I have four cells I want to merge into one cell.
I have used the "=A1 & " " & B1 & " " & C1 & " " & D1
to combine them into one cell - but what do I use to tell it
to not put a space if there is no middle initial or no suffix? Thanks

A1 A2 A3 A4
John D. Ameen
Kenneth E. Amos Jr.
Brett Anderson
Gregory T. Anderson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Merging three cells into one

Actually, this one should have been:
=A1&IF(B1="",""," "&B1)&" "&C1&IF(D1="",""," "&D1)
--
John C


"John C" wrote:

=A1&IF(B1="",""," "&B1)&C1&IF(D1="",""," "&D1)

Hope this helps.
--
John C


"Randi" wrote:

I have four cells I want to merge into one cell.
I have used the "=A1 & " " & B1 & " " & C1 & " " & D1
to combine them into one cell - but what do I use to tell it
to not put a space if there is no middle initial or no suffix? Thanks

A1 A2 A3 A4
John D. Ameen
Kenneth E. Amos Jr.
Brett Anderson
Gregory T. Anderson

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
merging cells together but keeping all data from the cells Pete C[_2_] Excel Discussion (Misc queries) 3 May 16th 08 10:14 PM
merging of cells He cries for help[_2_] Excel Discussion (Misc queries) 3 January 30th 08 03:52 PM
Merging Cells David New Users to Excel 24 September 2nd 06 08:36 PM
Merging Cells DC Excel Discussion (Misc queries) 4 February 21st 06 06:42 PM
Merging Cells BruceT Excel Worksheet Functions 1 December 2nd 04 06:38 AM


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

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

About Us

"It's about Microsoft Excel"