Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
writing a small array to a single cell as a string
I've been knocking my head against the desk for a few days about
this... probably due more to my inexperience than the difficulty of the problem. I have a small (variable size )array and I want to write it to a single cell as a string. Like this 10 12 10 12 I'm seeing lot's of things about turning stuff into arrays, but haven't found anything I can adapt to going the other way. Here's my code: Sub Tester3() Dim aStr As String Dim myarray(3) myarray = Array("10", "12", "10", "12") Dim i As Variant For i = LBound(myarray) To UBound(myarray) sStr = myarray(i) & ", " & IIf(aStr = "", "", ", ") & i.Value Next i Debug.Print (aStr) I got the sStr - myarray... from something T. Ogilvy suggested for a different, but to me similar problem. I get an error saying I need an object. I know I need to concatenate the values, but what am I missing? (besides decent knowledge;-) a.j. fox |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to continue writing in a single cell? | Excel Discussion (Misc queries) | |||
Writing Single Dimension Array to Active Sheet | Excel Programming | |||
having trouble writing string to cell-xl2k | Excel Programming | |||
VBA - Convert my variable range array to single cell string | Excel Programming | |||
"Small" Multi-Dimensional Array Slow Writing To Cell | Excel Programming |