• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Insert array values into a multi-column listbox, then paste selected values

edbyford

New Member
I have two columns of data, one is a number, and one is a name on one worksheet, 'Search'.


I have a similar arrangement of data on another sheet in the same workbook called 'Database'.


The difference between the two is that in Database the numbers are present but with other characters around them (letters etc.).


I've created a macro which, using the Cells.Find function locates possible matches for the number and places them, and the cell next to them ('Name'), into an array.


I then need a listbox of these possible matches to pop up (with the name next to it), and for the user to select the 'best' match from the listbox. This should then paste both the number and the name into two columns on the 'Search' spreadsheet.


https://www.dropbox.com/s/1tsqn37hqkcje8i/Mockup.xlsm
 
Hi, edbyford!


First of all welcome to Chandoo's website Excel forums. Thank you for your joining us and glad to have you here.


As a starting point I'd recommend you to read the three first green sticky topics at this forums main page. There you'll find general guidelines about how this site and community operates (introducing yourself, posting files, netiquette rules, and so on).


Among them you're prompted to perform searches within this site before posting, because maybe your question had been answered yet.


Feel free to play with different keywords so as to be led thru a wide variety of articles and posts, and if you don't find anything that solves your problem or guides you towards a solution, you'll always be welcome back here. Tell us what you've done, consider uploading a sample file as recommended, and somebody surely will read your post and help you.


And about your question...


Give a look at this file:

https://dl.dropbox.com/u/60558749/Insert%20array%20values%20into%20a%20multi-column%20listbox%2C%20then%20paste%20selected%20values%20-%20Mockup%20%28for%20edbyford%20at%20chandoo.org%29.xlsm


If you don't want to select automatically cell A3 before running the macro, then comment this line:

Cells(3, 1).Select


I tried to don't modify your code, just comment the unnecessary statements and added the new ones. Added to an user form with a list box and two command button controls.


Just advise if any issue.


Regards!
 
Back
Top