Excel VBA ListBox Multiple Selections to a Single Cell Comma Separated

  Рет қаралды 90,175

ExcelVbaIsFun

ExcelVbaIsFun

Күн бұрын

Пікірлер: 72
@excelisfun
@excelisfun 7 жыл бұрын
Thanks for the VBA TEXTJOIN fun !!!!
@ExcelVbaIsFun
@ExcelVbaIsFun 7 жыл бұрын
Thanks for being infinitely awesome!!
@undiscovered46
@undiscovered46 6 жыл бұрын
Great tutorial, everything works perfectly! I'm just wondering - is there any simple way to modify the code to have every value in new cell instead of separating them with commas?
@petebatko8591
@petebatko8591 6 жыл бұрын
Thank you for the very informative look into Multiple selections.As your video explains the script writes to Range ("a2"), but I would like to be able to add to a new row rather than a single cell.I have multiple users with multiple data and I would like to know how to save multi-selections to the spreadsheet for each user on a new row
@carlosadriano5641
@carlosadriano5641 2 жыл бұрын
Meu Deus... Simplesmente fantástico...nunca fica antigo ... Parabéns... Obrigado pela aula 🙏👏👏👏👏
@ExcelVbaIsFun
@ExcelVbaIsFun 2 жыл бұрын
Thanks for the comments!
@valentinneufeld6182
@valentinneufeld6182 2 жыл бұрын
Nice! This is what I'm looking for. Thank you.
@ExcelVbaIsFun
@ExcelVbaIsFun 2 жыл бұрын
Very glad it helped!
@pasongsinkhamchan1033
@pasongsinkhamchan1033 Жыл бұрын
Wonderful! can you also show how I can add many texts (from the same textbox) after clicking add button to one textbox with separator as well.
@Qwinster
@Qwinster Жыл бұрын
This is great one thing I cant seem to find is how to populate that list back into the list box (for instance using this example I have a customer that ordered Apples and Peaches, when I pull up the order again how do I get Cell A2 to populate the listbox items Apples / peaches as selected?
@krn14242
@krn14242 7 жыл бұрын
Thanks Daniel. I was just trying to join some stuff like this recently and was going about it the wrong way. I was adding my comma "after" the word and then trying to remove the last comma. After watching this video I see how easy it is to do the opposite way. Test for a string then add the comma before the "next" string... I made some crazy code to make it work, but this is SOOOOO much easier. My code adds the comma after each "selected" string and then I do a len(string) -2 to remove. lol. Thanks so much.
@ExcelVbaIsFun
@ExcelVbaIsFun 7 жыл бұрын
Awesome! So glad this helped. Yes, there are definitely a lot of ways to go about these things! I've done it where I add the comma afterwards also. Thanks Dan
@joyjuros3007
@joyjuros3007 4 жыл бұрын
Good video.. Nice step by step.
@milliadane5077
@milliadane5077 5 жыл бұрын
When you run it the second time it change the first selected items ... is that possible to send second time selected item to the next row? If so how u do it?
@lachlanbartsh1349
@lachlanbartsh1349 Жыл бұрын
Hi Dan, Great Video. I am hoping to reverse this somehow so that when i am editing the userform it pre populates with the matches from the cell value as selected in the listbox. So basically i want this put in reverse. I want to pull from the sheet and mark as selected in the listbox. Can this be done?
@thelessonsmymotherforgotto8180
@thelessonsmymotherforgotto8180 4 жыл бұрын
Is there a way to make one user form and use it for multiple cells? I want to make a different selection from the original user form for different cells in the column. I've already coded the userform to open up by double clicking in any cells in the column, but when i select the data, its still showing in the original cell. I would like to select another row, and make different selections and have those selections ONLY apply to that chosen cell.
@exceladvisor29
@exceladvisor29 4 жыл бұрын
you did great work but i want to ask you very important thing is that if i want to apply these changes for example Column A1 to A10 then what code should i write. because your coding is working on specific cell "A2" please guide ma
@diegoarmandoaristizabalvar6797
@diegoarmandoaristizabalvar6797 4 жыл бұрын
Works perfectly. Thank you so much. Keep doing as good as you do it!!
@ExcelVbaIsFun
@ExcelVbaIsFun 4 жыл бұрын
Thanks, Diego! So glad it's working for you!!
@jessicak373
@jessicak373 4 жыл бұрын
Thanks for the useful video -- very clear and easy to follow. What would I need to do if I want to set up multiple selections to a single cell for multiple columns where each column has a different list from which users will choose from? Thank you in advance!
@dipakchauhan5121
@dipakchauhan5121 4 жыл бұрын
Hello, is there any video on multi selected list box row data transfer to textbox for add new column
@yashrastogi7793
@yashrastogi7793 Жыл бұрын
Hi, I saw this video interesting. Actually i am looking for similar thing but in my case i want the multi selection which populate values in rows instead of one cell. For example: if user select Apple & Oranges then after hitting that button these two should populate in different row like Row1 = Apple & Row2 = Oranges. How we can do this?
@virginiawaring1084
@virginiawaring1084 2 жыл бұрын
Thank you!!!!
@ExcelVbaIsFun
@ExcelVbaIsFun 2 жыл бұрын
Awesome, Virginia! Thanks for the thanks! You're very welcome!
@rhonwynwilliams1968
@rhonwynwilliams1968 4 жыл бұрын
Which code would I use for adding the data to the next available row data: I currently have - ws.Cells(iRow, 12).Me.BranchListBox.List = myVar
@buckyafitch
@buckyafitch 5 жыл бұрын
That's a very helpful video and a much easier and better way that I managed to do it. Now my problem is I have the list populated separated by commas in excel when I want to Edit the selection from a user form I wish to have those Items selected in the list box.... Any help will be appreciated.
@lalalamiao4600
@lalalamiao4600 3 жыл бұрын
You lifesaver :D THANK YOU!
@ExcelVbaIsFun
@ExcelVbaIsFun 3 жыл бұрын
Glad it helped!
@LiveLoveMazy
@LiveLoveMazy 4 жыл бұрын
Hey friend do you have a video that does this but paste on separate rows please?
@asadsurg
@asadsurg 7 жыл бұрын
Great video. Always fun to watch. I was trying to resolve a very similar issue for one of my projects for last many days and it solved the problem!
@ExcelVbaIsFun
@ExcelVbaIsFun 7 жыл бұрын
So glad it helped!
@haseotod2251
@haseotod2251 5 жыл бұрын
Super useful for the application i am running. Thank you.
@jayshen1255
@jayshen1255 5 жыл бұрын
Hi. What if i want to add multiple selections from a listbox into consecutive rows? For example i select apples and peaches from my listbox, I would like it to show as appls in Row A1 and peaches in Row A2. How would this be done?
@alassanedembele3672
@alassanedembele3672 7 жыл бұрын
hello I just saw your video and I liked it very much but is it possible to come back to the line with each recording? thank you!
@yusdur28
@yusdur28 3 жыл бұрын
perfectly works
@riansutarsa
@riansutarsa 4 жыл бұрын
What if otherwise sir, from a column in the listbox with comma separator to ceckbox
@scottfromoahu2896
@scottfromoahu2896 6 жыл бұрын
Wow. This is fantastic. I'm interested in trying to accomplish this without the in-cell dropdown and figured out that it can be done with checkboxes by changing the listbox's ListStyle to "1 - fmListStyleOption". The problem is that I dont know how to trigger the opening of the userform when the data entry person tries to put values in the cell. Anyone know how to do that?
@daljeetsingh1231
@daljeetsingh1231 3 жыл бұрын
I have 2 Dropdown List with the same options (Included and Excluded) in different sheets. If I select " Included" in one dropdown list, it should also select "Included" on another dropdown list and vice versa. I am new in coding please help me out to crack this.
@eCabinetstipsandtricks
@eCabinetstipsandtricks 7 жыл бұрын
Hi Dan, great video. I was wondering if you have worked with power query/get and transform. I recently found out that in excel 2016 they added the ability to record macros while working with Get and transform.
@suraksha7841
@suraksha7841 4 жыл бұрын
Thank you for this tutorial. Can you please help: when i click on edit i want that the data thats save on the single cells shows in the listbox. How to do this? I am searching but can't find anything such. Thanks in advance.
@ExcelVbaIsFun
@ExcelVbaIsFun 4 жыл бұрын
Hi Suraksha, I'm not sure if I understand the goal. Can you help us understand? Thanks Dan
@suraksha7841
@suraksha7841 4 жыл бұрын
@@ExcelVbaIsFun Thank you for replying. I have a userform with labels, textbox and listbox. The listbox contains all departments of the company which are shown and the user can make multiple selection out of the listbox. When i click the save button this will appear in the worksheet/ respective row and columns (just like you did in this tutorial). Lets say the user wants to edit the data that was saved earlier in the userform and that means that the save data should appear in the userform. How to get the departments thats was selected shown in the userform when the edit button is press. I don't know if this is possible. I have search on the internet but can't find any solution for this problem. If you can please help me with this. Thanks in advance.
@markolukic6760
@markolukic6760 4 жыл бұрын
I have the same issue... don't know how to call checked options in list-box when trying to edit entry
@yusdur28
@yusdur28 3 жыл бұрын
thanks
@joyjuros3007
@joyjuros3007 4 жыл бұрын
Sir, can you make a video about connected worksheet. Say for example "There are two computers, comp1 and comp 2. Using an excel VBA how to send bunch of data to LOG WORKSHÈET on comp 2 from WORKBOOK on comp1?". Thank you sir. More power. Hope I'll be notified.
@theprogrammer1677
@theprogrammer1677 7 жыл бұрын
Very nice video! Could you please take one about "withEvents"?
@phuwamethprasertjitsan4044
@phuwamethprasertjitsan4044 6 жыл бұрын
thank you very much bro! this way help my project and thank you again.
@rayhana1118
@rayhana1118 6 жыл бұрын
Thank you so much ! you're awesome
@mrdt56
@mrdt56 2 жыл бұрын
Probably a very dumb question, but now that we have the form, how can we make it so that a user can call the form to enter the data?
@ExcelVbaIsFun
@ExcelVbaIsFun 2 жыл бұрын
Great question, Steven. From a code module, you can open a userform by using the name of the form and using the .Show method, so for example Userform1.Show Thanks Dan
@mrdt56
@mrdt56 2 жыл бұрын
@@ExcelVbaIsFun thank you!
@KefkaPalazz0
@KefkaPalazz0 6 жыл бұрын
Super beginner at VBA but like math and computers a lot. First off, I really enjoyed this tutorial, but what I'm trying to do is hard to search for. Id like to create a multi option drop down list that populates each new item in a new line of the same cell instead of separated by commas. With word wrap it should automatically increase or decrease row height to accommodate more or fewer selected items. I believe I can do this from this and other references, however I need to do this for an entire column in a sheet and then repeat this for other columns in the same sheet but for different list boxes. How can I do this process for an entire column, with the exception of the header? Id also like to be able to use the filter function at the top to filter out all rows that don't contain the item or items selected by the filter option.
@garethcthomashow
@garethcthomashow 6 жыл бұрын
Try substituting "," with chr(10). That's what I've done and seems to work.
@kingimad6243
@kingimad6243 6 жыл бұрын
Thank you so much for this tuto.........i'm looking for VBA code to export data from Cell A1 to B1 keeping record of old cell (B1) value against new value
@ExcelVbaIsFun
@ExcelVbaIsFun 6 жыл бұрын
Hi King Imad, Try: Range("b1").Value = Range("a1").Value to transfer the value from one cell to another. Thanks Dan
@kingimad6243
@kingimad6243 6 жыл бұрын
Thank you so much friend ^^
@ExcelVbaIsFun
@ExcelVbaIsFun 6 жыл бұрын
You're so welcome!
@amdanielgaming
@amdanielgaming 3 жыл бұрын
How can we do same on sheets
@adoniswalk
@adoniswalk 6 жыл бұрын
VBA is really fun! It works wonderful, thank you. Would you happen to know how to make the selections appear unselected when the form is launched? Nevermind, I figured it out.
@seckinbilgic
@seckinbilgic 5 жыл бұрын
What if I choose watermelon and it adds 3 to that cell?
@TalentedTeensOf1998
@TalentedTeensOf1998 3 жыл бұрын
What if you need to ignore delimiters.
@griffingartner3142
@griffingartner3142 6 жыл бұрын
I'm super late for the party, but I'm wondering how you can clear the selections after submission automatically without needing to reclick on the list items. Thanks Dan.
@Preirin
@Preirin 6 жыл бұрын
Hmmm. I get to myVar = myVar & "," & me.lbxName.List(x,0) and receive "Could not get the list property". Anyone else having this issue? Resolution?
@vico1540
@vico1540 3 жыл бұрын
It didn't work for me. Error 9 is ocurring. Does someone knows how to fix it?
@ExcelVbaIsFun
@ExcelVbaIsFun 3 жыл бұрын
Hi Vico, can we see your code? Thanks
@vico1540
@vico1540 3 жыл бұрын
​@@ExcelVbaIsFun I found out my mistake! :) Your code is perfect! Thank you very much for trying to help! Now I have a new challenge. I would like to make the Userform avaiable in all cells of column B. Any tips of how to make that?
@ExcelVbaIsFun
@ExcelVbaIsFun 3 жыл бұрын
@@vico1540 Sure, can you send the full spec to admin@excelvbaisfun.com and I can take a look and give you some ideas. Alternatively, you can post this in the FB group www.excelvbaisfun.com/ninja Thanks :)
@binheng1766
@binheng1766 7 жыл бұрын
how to spell vba code example one hundred and one pcs
@RobLego
@RobLego 7 жыл бұрын
why not skip the if statement and just say myVar = myVar & Me.lbxfoods.List(x,0) & ", " Then just take off the last comma before returning the result?
@ExcelVbaIsFun
@ExcelVbaIsFun 7 жыл бұрын
Hi Rob, That would be the other way I recommend doing it, using the Len function. Thanks!!
@cardguys
@cardguys 6 жыл бұрын
it is important to let folks know what the lbxFoods list is. I don't know that it was well expressed in the video. Also there is little error checking. Could you possible go over the finished product in better detail please? Thanks.
@ramjamkrindo9923
@ramjamkrindo9923 5 жыл бұрын
Excel VBA ListBox Multiple Selections to a Single TEXTBOX Comma Separated, Mister?
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН
Жездуха 42-серия
29:26
Million Show
Рет қаралды 2,6 МЛН
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН
진짜✅ 아님 가짜❌???
0:21
승비니 Seungbini
Рет қаралды 10 МЛН
Excel VBA Forms Part 7 - ListBox Controls
28:47
WiseOwlTutorials
Рет қаралды 74 М.
Multiple Dependent Drop-Down List in Excel | NEW Simple Method | Works with multiple rows
15:03
How to Hide Excel and Show Userform ONLY - Excel VBA
10:50
ExcelVbaIsFun
Рет қаралды 289 М.
Listbox Selection To Fill Other Listbox From Sheet Entries
12:46
ExcelVbaIsFun
Рет қаралды 21 М.
How to Create A Multi-Select Drop-Down List in Excel
8:09
Sharon Smith
Рет қаралды 211 М.
EASILY Make an Automated Data Entry Form in Excel
14:52
Kenji Explains
Рет қаралды 1,1 МЛН
Displaying a Chart in a UserForm dynamically
17:27
TheDataLabs
Рет қаралды 45 М.
Dependent Drop Down List in Excel Tutorial
11:10
Kevin Stratvert
Рет қаралды 654 М.
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН