#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 89
Default Jululian & Excel

Dear All,

I have one colum and 30 rows
and i want to put all in one cell and i am using
A1&A2&A3

please advice if there is any other soultion

regards
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Jululian & Excel

You could put this in B1:

=A1

and then put this in B2

=B1&A2

Copy this down to B30, and this final cell will contain the composite
string.

Hope this helps.

Pete

On Nov 1, 10:55*am, George A. Jululian
wrote:
Dear All,

I have one colum and 30 rows
and i want to put all in one cell and i am using
A1&A2&A3

please advice if there is any other soultion

regards


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Jululian & Excel

It would be nice if there was a function like =SUM() that would concatenate
vlues rather than sum them. We can make such a function (User Defined
Function):

Function concat(r As Range) As String
Dim rr As Range
concat = ""
For Each rr In r
concat = concat & rr.Value
Next
End Function



User Defined Functions (UDFs) are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the UDF from Excel:

=concat(A1:A30)

To learn more about macros in general, see:

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

or

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx
for specifics on UDFs

--
Gary''s Student - gsnu200908


"George A. Jululian" wrote:

Dear All,

I have one colum and 30 rows
and i want to put all in one cell and i am using
A1&A2&A3

please advice if there is any other soultion

regards

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default Jululian & Excel

we could even expand on that to give it the ability to put a "delimiter" or
separator between each non-empty cell's values in the result:

Function concatplus(r As Range) As String
Dim rr As Range
Const delimiter = " " ' could change to ", "," if desired
concatplus = ""
For Each rr In r
If Not IsEmpty(rr) Then
concatplus = concatplus & rr.Value & delimiter
End If
Next
If Len(concatplus) 0 Then
'remove last, unnecessary delimiter
concatplus = Left(concatplus, _
Len(concatplus) - Len(delimiter))
End If
End Function


"Gary''s Student" wrote:

It would be nice if there was a function like =SUM() that would concatenate
vlues rather than sum them. We can make such a function (User Defined
Function):

Function concat(r As Range) As String
Dim rr As Range
concat = ""
For Each rr In r
concat = concat & rr.Value
Next
End Function



User Defined Functions (UDFs) are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the UDF from Excel:

=concat(A1:A30)

To learn more about macros in general, see:

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

or

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx
for specifics on UDFs

--
Gary''s Student - gsnu200908


"George A. Jululian" wrote:

Dear All,

I have one colum and 30 rows
and i want to put all in one cell and i am using
A1&A2&A3

please advice if there is any other soultion

regards

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 89
Default Jululian & Excel

First of all many thank

please advice where i wirte them or how can use the

regards


"JLatham" wrote:

we could even expand on that to give it the ability to put a "delimiter" or
separator between each non-empty cell's values in the result:

Function concatplus(r As Range) As String
Dim rr As Range
Const delimiter = " " ' could change to ", "," if desired
concatplus = ""
For Each rr In r
If Not IsEmpty(rr) Then
concatplus = concatplus & rr.Value & delimiter
End If
Next
If Len(concatplus) 0 Then
'remove last, unnecessary delimiter
concatplus = Left(concatplus, _
Len(concatplus) - Len(delimiter))
End If
End Function


"Gary''s Student" wrote:

It would be nice if there was a function like =SUM() that would concatenate
vlues rather than sum them. We can make such a function (User Defined
Function):

Function concat(r As Range) As String
Dim rr As Range
concat = ""
For Each rr In r
concat = concat & rr.Value
Next
End Function



User Defined Functions (UDFs) are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the UDF from Excel:

=concat(A1:A30)

To learn more about macros in general, see:

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

or

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx
for specifics on UDFs

--
Gary''s Student - gsnu200908


"George A. Jululian" wrote:

Dear All,

I have one colum and 30 rows
and i want to put all in one cell and i am using
A1&A2&A3

please advice if there is any other soultion

regards



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 89
Default Jululian & Excel

First of all many thank

please advice where i wirte them or how can use them

regards

"Gary''s Student" wrote:

It would be nice if there was a function like =SUM() that would concatenate
vlues rather than sum them. We can make such a function (User Defined
Function):

Function concat(r As Range) As String
Dim rr As Range
concat = ""
For Each rr In r
concat = concat & rr.Value
Next
End Function



User Defined Functions (UDFs) are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the UDF from Excel:

=concat(A1:A30)

To learn more about macros in general, see:

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

or

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx
for specifics on UDFs

--
Gary''s Student - gsnu200908


"George A. Jululian" wrote:

Dear All,

I have one colum and 30 rows
and i want to put all in one cell and i am using
A1&A2&A3

please advice if there is any other soultion

regards

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 89
Default Jululian & Excel

Many Thanks

i wrote them all

many thanks agian



"JLatham" wrote:

we could even expand on that to give it the ability to put a "delimiter" or
separator between each non-empty cell's values in the result:

Function concatplus(r As Range) As String
Dim rr As Range
Const delimiter = " " ' could change to ", "," if desired
concatplus = ""
For Each rr In r
If Not IsEmpty(rr) Then
concatplus = concatplus & rr.Value & delimiter
End If
Next
If Len(concatplus) 0 Then
'remove last, unnecessary delimiter
concatplus = Left(concatplus, _
Len(concatplus) - Len(delimiter))
End If
End Function


"Gary''s Student" wrote:

It would be nice if there was a function like =SUM() that would concatenate
vlues rather than sum them. We can make such a function (User Defined
Function):

Function concat(r As Range) As String
Dim rr As Range
concat = ""
For Each rr In r
concat = concat & rr.Value
Next
End Function



User Defined Functions (UDFs) are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the UDF from Excel:

=concat(A1:A30)

To learn more about macros in general, see:

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

or

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx
for specifics on UDFs

--
Gary''s Student - gsnu200908


"George A. Jululian" wrote:

Dear All,

I have one colum and 30 rows
and i want to put all in one cell and i am using
A1&A2&A3

please advice if there is any other soultion

regards

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 89
Default Jululian & Excel

Many Thanks

i wrote them all

many thanks agian



"Gary''s Student" wrote:

It would be nice if there was a function like =SUM() that would concatenate
vlues rather than sum them. We can make such a function (User Defined
Function):

Function concat(r As Range) As String
Dim rr As Range
concat = ""
For Each rr In r
concat = concat & rr.Value
Next
End Function



User Defined Functions (UDFs) are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the UDF will be saved with it.

To remove the UDF:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the UDF from Excel:

=concat(A1:A30)

To learn more about macros in general, see:

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

or

http://www.cpearson.com/excel/Writin...ionsInVBA.aspx
for specifics on UDFs

--
Gary''s Student - gsnu200908


"George A. Jululian" wrote:

Dear All,

I have one colum and 30 rows
and i want to put all in one cell and i am using
A1&A2&A3

please advice if there is any other soultion

regards

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
Excel Jululian George A. Jululian[_2_] Excel Discussion (Misc queries) 4 October 5th 09 01:19 PM
Excel Jululian George A. Jululian[_2_] Excel Discussion (Misc queries) 8 February 24th 09 12:56 PM
Excel Jululian George A. Jululian[_2_] Excel Discussion (Misc queries) 9 February 7th 09 01:56 PM
Excel Jululian George A. Jululian[_2_] Excel Discussion (Misc queries) 5 December 17th 08 05:00 PM


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