Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
barbierim
 
Posts: n/a
Default Here's an EASY one for you, not me :(


OK I have zipcodes in column A (a1-a700) and I would like to put all
into B1 separated by a ",".

so that B1 will have 700 zipcodes all separated by a comma

what's the formula?

Gracias in advance
Mark


--
barbierim
------------------------------------------------------------------------
barbierim's Profile: http://www.excelforum.com/member.php...o&userid=28381
View this thread: http://www.excelforum.com/showthread...hreadid=479689

  #2   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default Here's an EASY one for you, not me :(

On Wed, 26 Oct 2005 22:57:51 -0500, barbierim
wrote:


OK I have zipcodes in column A (a1-a700) and I would like to put all
into B1 separated by a ",".

so that B1 will have 700 zipcodes all separated by a comma

what's the formula?

Gracias in advance
Mark


You need a UDF.

<alt<F11 opens the VB Editor.

Ensure your project is highlighted in the project explorer window. Then
Insert/Module and paste the code below into the window that opens.

Return to your worksheet and enter the formula:

B1: =concatssn(A1:A700)


==================================
Option Explicit

Function ConCatSSN(rg) As String
Dim c As Variant
For Each c In rg
ConCatSSN = ConCatSSN & ", " & c.Text
Next
ConCatSSN = Replace(ConCatSSN, ", ", "", , 1)
End Function
==========================


--ron
  #3   Report Post  
Alvin
 
Posts: n/a
Default Here's an EASY one for you, not me :(

i don't know if there is any direct function for this....
i suggest you to use VBA..

Function Concate(x)
For Each b In x.Cells
a = a & b & ", "
Next
Concate = Left(a, Len(a) - 1)
End Function

just type in B1:
=Concate(a1:a700)


"barbierim" wrote:


OK I have zipcodes in column A (a1-a700) and I would like to put all
into B1 separated by a ",".

so that B1 will have 700 zipcodes all separated by a comma

what's the formula?

Gracias in advance
Mark


--
barbierim
------------------------------------------------------------------------
barbierim's Profile: http://www.excelforum.com/member.php...o&userid=28381
View this thread: http://www.excelforum.com/showthread...hreadid=479689


  #4   Report Post  
barbierim
 
Posts: n/a
Default Here's an EASY one for you, not me :(


Ron Rosenfeld Wrote:
On Wed, 26 Oct 2005 22:57:51 -0500, barbierim
wrote:


OK I have zipcodes in column A (a1-a700) and I would like to put all
into B1 separated by a ",".

so that B1 will have 700 zipcodes all separated by a comma

what's the formula?

Gracias in advance
Mark


You need a UDF.

<alt<F11 opens the VB Editor.

Ensure your project is highlighted in the project explorer window.
Then
Insert/Module and paste the code below into the window that opens.

Return to your worksheet and enter the formula:

B1: =concatssn(A1:A700)


==================================
Option Explicit

Function ConCatSSN(rg) As String
Dim c As Variant
For Each c In rg
ConCatSSN = ConCatSSN & ", " & c.Text
Next
ConCatSSN = Replace(ConCatSSN, ", ", "", , 1)
End Function
==========================


--ron

Worked like a charm, Thanks
MB


--
barbierim
------------------------------------------------------------------------
barbierim's Profile: http://www.excelforum.com/member.php...o&userid=28381
View this thread: http://www.excelforum.com/showthread...hreadid=479689

  #5   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default Here's an EASY one for you, not me :(

On Thu, 27 Oct 2005 17:09:49 -0500, barbierim
wrote:

Worked like a charm, Thanks
MB


--
barbierim


You're welcome. Thank you for the feedback.

--ron
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
Stack multiple columns into one column... is there an easy way? Julian Excel Discussion (Misc queries) 2 September 16th 05 07:31 PM
OsCommerce - Easy Populate Script - CSV/TXT Conversion Problem. PriceTrim Excel Discussion (Misc queries) 3 July 5th 05 05:27 PM
Is there an easy way to create a calendar look up table in excel Addison Excel Discussion (Misc queries) 0 June 9th 05 10:32 PM
new user with easy question? not easy for me speakeztruth New Users to Excel 5 June 3rd 05 09:40 PM
is there an easy way to move parts of cells around jvoortman Excel Discussion (Misc queries) 0 January 21st 05 11:08 PM


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