Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default Creating a text string by reading content in multiple cells

I have a column where each cell contains a single letter. I need to
consolidate all these letters and form a single string of text in a separate
cell. In other words, a function equivalent to sum() for characters is what
i'm looking for. Concatenate() works only with 34 cells, and creating a "sum"
of different Concatenate() doesn't seem to work fine.

Any smart way to solve my problem?

Thanks, Stefano
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Creating a text string by reading content in multiple cells

Skip CONCATENATE

Just use the ampersand (&), like this example which contatenates cells A1:A40

=A1&A2&A3&A4&A5&A6&A7&A8&A9&A10&A11&A12&A13&A14&A1 5&A16&A17&A18&A19&A20&A21&A22&A23&A24&A25&A26&A27& A28&A29&A30&A31&A32&A33&A34&A35&A36&A37&A38&A39&A4 0

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"smaruzzi" wrote:

I have a column where each cell contains a single letter. I need to
consolidate all these letters and form a single string of text in a separate
cell. In other words, a function equivalent to sum() for characters is what
i'm looking for. Concatenate() works only with 34 cells, and creating a "sum"
of different Concatenate() doesn't seem to work fine.

Any smart way to solve my problem?

Thanks, Stefano

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default Creating a text string by reading content in multiple cells

Ron,

thanks a lot. I used CONCATENATE() but got a weird behavior once in awhile.
I ended up write this simple routine, which seems to work fine:

Function SumChar(Data As Range) As String
Dim i As Integer
Dim strMeans As String


For i = 1 To Data.Rows.Count
If Data(i) < "" Then
strMeans = strMeans + Data(i)
End If
Next
SumChar = strMeans
End Function

Thanks, Stefano

"Ron Coderre" wrote:

Skip CONCATENATE

Just use the ampersand (&), like this example which contatenates cells A1:A40

=A1&A2&A3&A4&A5&A6&A7&A8&A9&A10&A11&A12&A13&A14&A1 5&A16&A17&A18&A19&A20&A21&A22&A23&A24&A25&A26&A27& A28&A29&A30&A31&A32&A33&A34&A35&A36&A37&A38&A39&A4 0

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"smaruzzi" wrote:

I have a column where each cell contains a single letter. I need to
consolidate all these letters and form a single string of text in a separate
cell. In other words, a function equivalent to sum() for characters is what
i'm looking for. Concatenate() works only with 34 cells, and creating a "sum"
of different Concatenate() doesn't seem to work fine.

Any smart way to solve my problem?

Thanks, Stefano

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 59
Default Creating a text string by reading content in multiple cells

Ciao Stefano,

The only problem with your function is that its result won't be refreshed
whenever you change any of the cells contained in the range passed as
parameter.
What Ron suggested will do it.
--
Stefano Gatto


"smaruzzi" wrote:

Ron,

thanks a lot. I used CONCATENATE() but got a weird behavior once in awhile.
I ended up write this simple routine, which seems to work fine:

Function SumChar(Data As Range) As String
Dim i As Integer
Dim strMeans As String


For i = 1 To Data.Rows.Count
If Data(i) < "" Then
strMeans = strMeans + Data(i)
End If
Next
SumChar = strMeans
End Function

Thanks, Stefano

"Ron Coderre" wrote:

Skip CONCATENATE

Just use the ampersand (&), like this example which contatenates cells A1:A40

=A1&A2&A3&A4&A5&A6&A7&A8&A9&A10&A11&A12&A13&A14&A1 5&A16&A17&A18&A19&A20&A21&A22&A23&A24&A25&A26&A27& A28&A29&A30&A31&A32&A33&A34&A35&A36&A37&A38&A39&A4 0

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"smaruzzi" wrote:

I have a column where each cell contains a single letter. I need to
consolidate all these letters and form a single string of text in a separate
cell. In other words, a function equivalent to sum() for characters is what
i'm looking for. Concatenate() works only with 34 cells, and creating a "sum"
of different Concatenate() doesn't seem to work fine.

Any smart way to solve my problem?

Thanks, Stefano

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 delete part of the content on multiple cells in excel? Luis Excel Discussion (Misc queries) 3 May 17th 23 07:42 PM
seperating text in one cell to multiple cells Joe Excel Discussion (Misc queries) 13 January 27th 06 11:53 PM
Alphabetically reorder a text string with multiple words Mike S Excel Worksheet Functions 4 October 28th 05 07:21 PM
stopping pasted text deliminate across multiple cells Paul from NZ Excel Discussion (Misc queries) 3 September 8th 05 06:06 AM
Help adding text values Texas-DC_271 Excel Worksheet Functions 7 January 15th 05 11:14 PM


All times are GMT +1. The time now is 09:50 PM.

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"