Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Convert array

Hi,

Is there anyone who can help me with this?
I need to convert the contents of an array to an ordinary variable.
Example,

Array (tjo:tji:tjapp...)

Variable = "tjo,tji,tjapp"

Thanks in advance!

BR
Daniel

--
--------------------------------------------------------
Daniel Köster
TEKNOTRANS AB
Redegatan 13
426 77 Västra Frölunda
Sweden
Tel: +46 31 69 47 60
Fax: +46 31 69 47 65
E-mail:
http://www.teknotrans.com


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default Convert array

Hi Daniel

If you have Excel 2000 or later,
you can use the "JOIN" function:


Sub Test()
'Leo Heuser, 24 Sept. 2003
Dim ArrayString As Variant
Dim CheckArray As Variant

CheckArray = Array("one", "two", "three")
' Or CheckArray = Array(1, 2, 3)

ArrayString = Join(CheckArray, ",")

MsgBox ArrayString
End Sub



--
Best Regards
Leo Heuser
MVP Excel

Followup to newsgroup only please.

"Daniel Köster" skrev i en meddelelse
...
Hi,

Is there anyone who can help me with this?
I need to convert the contents of an array to an ordinary variable.
Example,

Array (tjo:tji:tjapp...)

Variable = "tjo,tji,tjapp"

Thanks in advance!

BR
Daniel

--
--------------------------------------------------------
Daniel Köster
TEKNOTRANS AB
Redegatan 13
426 77 Västra Frölunda
Sweden
Tel: +46 31 69 47 60
Fax: +46 31 69 47 65
E-mail:
http://www.teknotrans.com




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Convert array

Great! Thank you!

Best regards
Daniel
"Leo Heuser" skrev i meddelandet
...
Hi Daniel

If you have Excel 2000 or later,
you can use the "JOIN" function:


Sub Test()
'Leo Heuser, 24 Sept. 2003
Dim ArrayString As Variant
Dim CheckArray As Variant

CheckArray = Array("one", "two", "three")
' Or CheckArray = Array(1, 2, 3)

ArrayString = Join(CheckArray, ",")

MsgBox ArrayString
End Sub



--
Best Regards
Leo Heuser
MVP Excel

Followup to newsgroup only please.

"Daniel Köster" skrev i en meddelelse
...
Hi,

Is there anyone who can help me with this?
I need to convert the contents of an array to an ordinary variable.
Example,

Array (tjo:tji:tjapp...)

Variable = "tjo,tji,tjapp"

Thanks in advance!

BR
Daniel

--
--------------------------------------------------------
Daniel Köster
TEKNOTRANS AB
Redegatan 13
426 77 Västra Frölunda
Sweden
Tel: +46 31 69 47 60
Fax: +46 31 69 47 65
E-mail:
http://www.teknotrans.com






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default Convert array

You're welcome.
Thanks for the feedback!

--
Best Regards
LeoH

"Daniel Köster" skrev i en meddelelse
...
Great! Thank you!

Best regards
Daniel



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
Convert table by date to array Toon Excel Worksheet Functions 6 November 12th 09 08:14 PM
Convert column to array? James Silverton Excel Discussion (Misc queries) 4 January 26th 07 05:50 PM
Array formulas convert to zero when e-mailing [email protected] Excel Discussion (Misc queries) 3 December 12th 06 06:13 PM
how to convert an array newengland Excel Discussion (Misc queries) 1 December 5th 05 10:02 PM
How do I convert a row of cells into a two-dimensional array? Glenn@stress Excel Worksheet Functions 7 October 10th 05 07:28 PM


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