+ Reply to Thread
Results 1 to 3 of 3

Text in a Cell to ListBox

  1. #1
    Registered User
    Join Date
    09-23-2012
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1

    Text in a Cell to ListBox

    Hi.

    I have some cells in my work that have more then on line, like whem you type Alt+Enter, for example:

    Cell A1 = abababab
    bcbcbccbc
    fgfgfgfgfgfg

    I need to extract each line and put in a ListBox, how can I do that?

    Regards,

    Manoel

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Text in a Cell to ListBox

    Hi,

    Unfortunately I've not got access to Excel just at the moment but there are two approaches you could take. Either use some helper columns to search the string for the 1st, 2nd, 3rd etc. occurrences of the code 10 (enter character) and then use string slicing functions to create those helper column values and load to your list boxes, or use some similar string slicing technique with a VBA macro.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Text in a Cell to ListBox

    You dont say where you Listbox is, Im assuming its on a userform or its a Active X Control Listbox

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1