Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Large list of numbers to concatenate

I have a list of 600+ zip codes that are curently in individual cells. I need
to turn them into one list separated by commas. Is this possible? The best
solution I can think of is
=concatenate(A1, ", ",B1)

However, is there a way to automate this instead of individually typing this
in for all 600+ cells?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,522
Default Large list of numbers to concatenate

Based on your zips in a row
Sub makestring()
mr = 1
lc = Cells(mr, Columns.Count).End(xlToLeft).Column
For i = 1 To lc
mys = mys & "," & Cells(mr, i)
Next i
MsgBox Right(mys, Len(mys) - 1)
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MaggieB." wrote in message
...
I have a list of 600+ zip codes that are curently in individual cells. I
need
to turn them into one list separated by commas. Is this possible? The best
solution I can think of is
=concatenate(A1, ", ",B1)

However, is there a way to automate this instead of individually typing
this
in for all 600+ cells?

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default Large list of numbers to concatenate

A similar question was asked & answered in the same newsgroup this morning.
That post was titled "Function to concatenate cells in a range":

http://www.microsoft.com/office/comm...c-06cc48cff765

Paste the function code provided by Jacob in a general VBA module in your
workbook. If you are new to user-defined functions (macros), this link to Jon
Peltier's site may be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"MaggieB." wrote:

I have a list of 600+ zip codes that are curently in individual cells. I need
to turn them into one list separated by commas. Is this possible? The best
solution I can think of is
=concatenate(A1, ", ",B1)

However, is there a way to automate this instead of individually typing this
in for all 600+ cells?

Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Large list of numbers to concatenate

Function ConCatRange(CellBlock As Range) As String

'=concatrange(range)
'for non-contiguous cells =ccr((a1:a10,c4,c6,e1:e5))

Dim Cell As Range
Dim sbuf As String
For Each Cell In CellBlock
If Len(Cell.text) 0 Then sbuf = sbuf & Cell.text & ","
Next
ConCatRange = Left(sbuf, Len(sbuf) - 2)
End Function

Ignores blanks and can be used for non-contiguous ranges.


Gord Dibben MS Excel MVP

On Thu, 3 Jun 2010 10:17:08 -0700, MaggieB.
wrote:

I have a list of 600+ zip codes that are curently in individual cells. I need
to turn them into one list separated by commas. Is this possible? The best
solution I can think of is
=concatenate(A1, ", ",B1)

However, is there a way to automate this instead of individually typing this
in for all 600+ cells?

Thanks!


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 determine the first 6 large numbers from a list? Eric Excel Discussion (Misc queries) 4 December 11th 07 04:42 PM
Concatenate large numbers of cells Seldonian Crisis[_2_] Excel Discussion (Misc queries) 4 November 27th 07 04:44 PM
Producing an automated list from a large list Chuckee Excel Worksheet Functions 0 February 26th 07 04:00 PM
how do search a list of numbers to find what adds up to a large # prissy Excel Discussion (Misc queries) 0 June 6th 06 02:48 AM
remove small list from large list Howie J. Excel Discussion (Misc queries) 2 January 4th 06 10:37 PM


All times are GMT +1. The time now is 06:42 PM.

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"