#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Help !!!

I need a formla that could return the values of a name range,

Example name range is "marco" and takes cells A1:A10

A1= 9901 Text
A2= 9902 Text
A3= 9903 Text
..
..
..

I need the formula to return as 9901,9902,9903...

did I make my self clear?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Help !!!

Not sure what you need
=A1&","&A2&","&A3&","&A4&","&A5&","&A6&","&A7&","& A8&","&A9&","&A10

"MESTRELLA29" wrote:

I need a formla that could return the values of a name range,

Example name range is "marco" and takes cells A1:A10

A1= 9901 Text
A2= 9902 Text
A3= 9903 Text
.
.
.

I need the formula to return as 9901,9902,9903...

did I make my self clear?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Help !!!

How about:

Function string_them(s As String) As String
Dim ss As String
Set rr = Range(s)
ss = ""
cma = True
For Each r In rr
If cma = True Then
cma = False
ss = r.Value
Else
ss = ss & "," & r.Value
End If
Next
string_them = ss
End Function

In a worksheet cell enter:

=string_them("marco")

You should use CONCATENATE if you don't need to refer to that Named Range.
--
Gary''s Student - gsnu200719


"MESTRELLA29" wrote:

I need a formla that could return the values of a name range,

Example name range is "marco" and takes cells A1:A10

A1= 9901 Text
A2= 9902 Text
A3= 9903 Text
.
.
.

I need the formula to return as 9901,9902,9903...

did I make my self clear?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default Help !!!

Thanks I found a work arround

"Gary''s Student" wrote:

How about:

Function string_them(s As String) As String
Dim ss As String
Set rr = Range(s)
ss = ""
cma = True
For Each r In rr
If cma = True Then
cma = False
ss = r.Value
Else
ss = ss & "," & r.Value
End If
Next
string_them = ss
End Function

In a worksheet cell enter:

=string_them("marco")

You should use CONCATENATE if you don't need to refer to that Named Range.
--
Gary''s Student - gsnu200719


"MESTRELLA29" wrote:

I need a formla that could return the values of a name range,

Example name range is "marco" and takes cells A1:A10

A1= 9901 Text
A2= 9902 Text
A3= 9903 Text
.
.
.

I need the formula to return as 9901,9902,9903...

did I make my self clear?

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



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