View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR
 
Posts: n/a
Default concatenate a range function

Very nice Duke.........and it even works with non-contiguious ranges as well,
which I like very much. I would ask tho, if it could be modified to allow
the user to select the cell for the concatenation to be placed in each time,
maybe by pop-up, rather than the location being hard coded in.

TIA
Vaya con Dios,
Chuck, CABGx3



"Duke Carey" wrote:

No functions of which I'm aware. A short macro would do it, tho

Sub ConcatSelection()
Dim rng As Range
Dim strConcat As String

For Each rng In Selection
strConcat = strConcat & rng.Text
Next
Range("B1") = strConcat
End Sub

For information on installing the code see
Getting Started with Macros and User Defined Functions

http://www.mvps.org/dmcritchie/excel/getstarted.htm



"Wildaz" wrote:

Is there a function similar to concatenate that doesn't require each
individual cell to be referenced?

I have a database that has information in cells A1 through A1000. I
currently use conatenate(A1, .....,A1000). Is there a fundtion that will
return the same information - FUNCTION(A1:A1000)?