Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default List Data to Single String

Is there a way that I can take the data from a ListBox (12 items) and load
into a merged cell as a single string

ListBox1 data
Cake
Ice Cream to Cake / Ice Cream /
Pies / Cookies
Pies
Cookies

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default List Data to Single String

With Userform1.Listbox
for i = 0 to .listcount - 1
if i < .listcount - 1 then
sStr = sStr & .list(i) & " / "
else
sStr = sStr & .List(i)
end if
Next
End With
' now assign to the cell in the upper left corner
' of the merged cell area

Range("B9").Value = sStr

--
Regards,
Tom Ogilvy

"asmenut" wrote in message
...
Is there a way that I can take the data from a ListBox (12 items) and load
into a merged cell as a single string

ListBox1 data
Cake
Ice Cream to Cake / Ice Cream /
Pies / Cookies
Pies
Cookies



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
Combo Bar-Line Graph with single list of data Melody Excel Discussion (Misc queries) 1 January 15th 10 03:56 PM
transfer data from 3x15 grid to a single list? Roady Excel Discussion (Misc queries) 3 October 18th 08 02:24 AM
removing duplicate data from a single list Brad Excel Worksheet Functions 1 October 7th 08 06:00 AM
Combine Formula and Data Validation List in a Single Cell ?? monir Excel Worksheet Functions 3 March 2nd 08 11:17 PM
generate a list from a single row of data Fred Excel Discussion (Misc queries) 4 February 16th 07 05:01 PM


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