Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Merging columns and adding separators

Hi I have 5000+ rows in my sheet the columns are as
follows -

A - Name
B - Unique Reference
C - Address Ln1
D - Address Ln2
E - Address Ln3
F - Address Ln4
G - PostCode

How can I get column H to bring to gether all the address
info into one column and be of the layout like this -

NAME, ADDRESS Ln1, ADDRESS Ln2, ADDRESS Ln3, ADDRESS Ln4,
POSTCODE, UNIQUE REFERENCE

Any help is much appreciated I cannot seem to keep all
the info together using the merge button and I dont know
how to programatically enter the commas to seperate the
results in the single cell.

Pete
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Merging columns and adding separators

in H1 put in

=A1 & ", " & C1 & ", " & D1 & ", " & E1 & ", " & F1 & ", " & G1 & ", " & B1

than drag fill down column H

select column H and do Edit=Copy then immediately Edit=Paste Special and
select Values.

--
Regards,
Tom Ogilvy

"Pete" wrote in message
...
Hi I have 5000+ rows in my sheet the columns are as
follows -

A - Name
B - Unique Reference
C - Address Ln1
D - Address Ln2
E - Address Ln3
F - Address Ln4
G - PostCode

How can I get column H to bring to gether all the address
info into one column and be of the layout like this -

NAME, ADDRESS Ln1, ADDRESS Ln2, ADDRESS Ln3, ADDRESS Ln4,
POSTCODE, UNIQUE REFERENCE

Any help is much appreciated I cannot seem to keep all
the info together using the merge button and I dont know
how to programatically enter the commas to seperate the
results in the single cell.

Pete



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Merging columns and adding separators

Thanks that has worked great is there a way to ensure all
spaces other than 1 following a comma should be ommited
as I have great big spaces in the address now!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Merging columns and adding separators

=Trim(Substitute(A1 & ", " & C1 & ", " & D1 & ", " & E1 & ", " & F1 & ", " &
G1 & ", " & B1,char(160)," "))

--
Regards,
Tom Ogilvy




"Pete" wrote in message
...
Thanks that has worked great is there a way to ensure all
spaces other than 1 following a comma should be ommited
as I have great big spaces in the address now!



  #5   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Merging columns and adding separators

Thanks Tom


-----Original Message-----
=Trim(Substitute(A1 & ", " & C1 & ", " & D1 & ", " & E1

& ", " & F1 & ", " &
G1 & ", " & B1,char(160)," "))

--
Regards,
Tom Ogilvy




"Pete" wrote in

message
...
Thanks that has worked great is there a way to ensure

all
spaces other than 1 following a comma should be ommited
as I have great big spaces in the address now!



.

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 and adding cells John MacFarlane Excel Discussion (Misc queries) 2 December 14th 09 08:33 PM
MERGING COLUMNS TO ONE Faraz A. Qureshi Excel Discussion (Misc queries) 1 June 12th 09 01:07 PM
merging 2 cells and adding a space. paul Excel Discussion (Misc queries) 1 February 6th 09 09:36 PM
Merging or Adding two .csv files Jim Rech Excel Programming 2 August 14th 03 04:56 PM
Merging or Adding two .csv files Jim Rech Excel Programming 0 August 14th 03 03:43 PM


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