If you face any issue like slow, then you can add a command button in userform and cut the code from TextBox and paste it into command button Thank you
@@Nsutradhar Thanks for headsup. A quick question, I see that if there are 2 letters in single name that record is listed 2 times or 3 times if it is repeated 3 times. EG: if customer name lets say is 'Dunkin Donuts ' and I search with only 'd' then it shows 2 lines for same records. I tried to trim but did not work. May be I am not doing it correct. any ideas?
Yes, it's exactly like what you replied & What I want.That's populate Textboxes & at the same time a listbox based on textbox1 keywords. Thanking you in anticipation.
If it works slow to load, then you can add a command button and replace the same code into the command button. If you have large data, then it will work slow. By the way thanks for your valuable feedback
is there anyway you can add another row on the userform? because i have tried another column and add code on it seems to be locked only the current set up
Hi , I really like your video, Specially the search function. Can you kindly add more function like ADD data...Delete Data...Update Data.... in this project...Thanks
Sir, Actually this code is not accept more than 9 column. I had made more than 9 columns then error shows "could not set library property, invalid property value". Can you help me... I want to increase the column count more than 15, but how???
Thanks for this video. I kindly need help here, if there are 3 worksheets available, how do you then search through these worksheets and display the result in the list-box?
hi can you make a video like this, whenever the user double click the listbox it will open the pdf file (with the hyperlink from excel table to pdf file) - pdf file that is located at the mapped network (this pc). really appreciate your kind help
I am Textiles engineer. I have to develop an AI where I can compare EPI, PPI, Greige width and gets Finished Width automatically. Please help what should I do...
my system is kinda like this but its not in userform. i want to make it like this but has more criteria for searching to narrow down the search cause mine is dealing with automotive parts. do you have any suggestion. i love your idea. :)
My query is: If the stock level falls below the minimum level we can do a conditional formatting in excel and show the present stock as red color or set ut to blink. And in the same way what would be the VBA code to show the same minimum stock level in listbox in high lighted form
Goodmorning sir, i found out that your tutorial was very useful, i tried some double click function on listbox and it will fill those necessary name, but it will always show the header that you created inside list box
@@NsutradharI want to fill out the textbox, for example, if I have a textbox for Product name, when I double click the result in the list box, it will fill the textbox with the product name that I double click.
'-------------Data Transfer from ListBox To TextBoxes---- Dim x As Integer For x = 1 To 9 Me("TextBox" & x).Value = Me.ListBox1.Column(x) Next x End If Next r
This is the only video that worked (partially) for me. I have several issues, the search column that I want to search by is my 6th column (column F), can you guide me to how I can do this? also search results are duplicated or occurs 3-4 times as am typing. In general, i don't really understad what i, x and p is...
Hi, Very good, but how to do it if we want to use the same textbox to look for a data from another column than the first? I would really like to know the solution for this case. thank you very much for your availability
i try same code to paste in textbox2 (the program code has been adjusted to column C), but textbox 2 don't filter result of filter textbox1 (column B). Or textbox1 don't filter result of textbox2. please help me.
You can try this for two comnobox If sheet1.cells(i, 2) = me.combobox1 and sheet1.cells(i,7) = me.combobox2 then me.listbox1.additem ..... ......... End if Next i
great lesson. However, I got an issue with my program. my excel data contain both alphabet and numeric in the same cell (eg. b230), whereas the search does not detect alphabet but it search according to number. Need help with this.
Hi, can you make one that has combo box criteria for multiple sheet in addition to this search codes. because I have 8 sheet in a work book and I want categorize using combo box then use this code to search base on a combo box criteria. thank you for sharing your knowledge.
Hi sir! Read all your videos.But got no solution.I'm in a fix-what to do.Problem is- I've an excel database with A:H. Among these I want to display data of A,B,C in 3 Textboxes & the left that is D:H in a Listbox simultaneously when i enter any data in textbox1 using an USERFORM. will be so lot appreciated if you do me a favor with a VBA code.Looking forward to you.
Dear Sir.. Its fantastic tutorial.. Pls suggest me code that whenever we did last entry from text box press enter on command button... then list box automatically shows last data entry record with selection without scrolling listbox.... Waiting for your genuine reply...
You can see 👇 th-cam.com/video/i1k7Vz9Q-iU/w-d-xo.html I hope you will find your answer.. You can visit my blog also nsutradhar.blogspot.com/p/view-all.html?m=0
It is not possible to remove many same result when you type only single letter. It will repeat your results as per your letter. You can try another method nsutradhar.blogspot.com/2020/09/listbox-with-multiple-criteria-in-excel.html?m=1
Please insert the below code befor End Sub. I hope it will work for you Dim k As Long Dim j As Long With ListBox1 For k = 0 To .ListCount - 1 For j = .ListCount - 1 To (k + 1) Step -1 If .List(j) = .List(k) Then .RemoveItem j End If Next Next End With
In the listbox the data I was looking for was found, but below the data, the listbox header appears and there are so many? What caused it? the order of the data in the listbox is like this: - The first line is the Listbox Header - second line: The data I'm looking for - next line: Listbox header (so many)
Hi Guru. Is there a fix to the duplicating values in the list box when typing the first character in the text box? Thank you so much for this tutorial. It is very helpful.
Duplicate value occurs bcz suppose you type "s" in TextBox and you have samsung mobile in your database and in Samsung mobile has two s, so that you will show twice in your listbox and when you type in full word it will show single. Thank you for writing
Private Sub CommandButton1_Click() 'declare all veriables....... Dim sh As Worksheet Set sh = Sheets("PRODUCT LIST") Dim i As Long Dim x As Long Dim p As Integer Me.ListBox1.Clear 'Set ListBox headers....... With Me.ListBox1 .AddItem "Search" .List(0, 1) = "ITEM CODE" .List(0, 2) = "SUPPLIER" .List(0, 3) = "ITEM" .List(0, 4) = "QYT" .List(0, 5) = "UOM" .List(0, 6) = "U / PRICE" End With 'select headers after search....... Me.ListBox1.Selected(0) = True 'use of i veriables to check each cell values...... For i = 3 To sh.Range("F" & Rows.Count).End(xlUp).Row For x = 1 To Len(sh.Cells(i, 6)) p = Me.TextBox1.TextLength ' condition apply by which it will search data..... If LCase(Mid(sh.Cells(i, 6), x, p)) = Me.TextBox1 And Me.TextBox1 "" Then With Me.ListBox1 .AddItem sh.Cells(i, 6) .List(.ListCount - 1, 1) = sh.Cells(i, 3) .List(.ListCount - 1, 2) = sh.Cells(i, 4) .List(.ListCount - 1, 3) = sh.Cells(i, 6) .List(.ListCount - 1, 4) = sh.Cells(i, 7) .List(.ListCount - 1, 5) = sh.Cells(i, 8) .List(.ListCount - 1, 6) = sh.Cells(i, 9) End With End If Next x Next i '------------NSUTRADHAR-------------------------------- End Sub
If you write full word then there will be no duplicate. And if you write partial then there will be duplicate. For example, if you write "a" then it will find for those rows contains "a". Suppose , banana has triple a so it show three times. Thank you
I have tried this, it works at first but I have 25 columns,I already set the columnwidth properties on listbox to 25, however I am getting error when I tried to load column header above 9(I start to 0). "Could not set the list property. Invalid property value." is the error
You can create a userform that shows only those items which are below minimum stock level. If sh.cells(i, 4) < 5 then Me.listbox1.additem ........... .......... End if
Sir when you type "A or C" OR any one character type then show one value multiple time U can see please correct it thanks Or give me email address I will send you screenshot thank you
actually if you write one letter then it find all values which contains this letter. supposed you want to search "banana" and you type in textbox "a" then it will show you three times banana bcz banana has contains three a thank you
Hi, I wanted to congratulate you on a fantastic job. But how can I also add the list of colon A ? If I put column C because the info to be filtered is in column C, in the listbox I can also get out the numbers in column A th-cam.com/video/zaPpkWYnAN4/w-d-xo.html
Hi sir! Watched your all videos.But got no solution.I'm in a fix-what to do.Problem is- I've an excel database with A:H. Among these I want to display data of A,B,C in 3 Textboxes & the left that is D:H in a Listbox simultaneously when i enter any data in textbox1 using an USERFORM. will be so lot appreciated if you do me a favor with a VBA code.Looking forward to you.
I want more clarification: That means.. Do you want to get data in textbox 2 and 3 and also listbox when you typing in textbox 1. Is it your issue? Let me know
Thanks dear you have solved my big problem.Thanks
Most welcome 😊 & subscribe please if you like it
I think you might have made the right video for my project.
Thanks
dynamic populating the list with text from textbox was awesome and I was able to do my work without issue. Thanks !
If you face any issue like slow, then you can add a command button in userform and cut the code from TextBox and paste it into command button
Thank you
@@Nsutradhar Thanks for headsup. A quick question, I see that if there are 2 letters in single name that record is listed 2 times or 3 times if it is repeated 3 times. EG: if customer name lets say is 'Dunkin Donuts ' and I search with only 'd' then it shows 2 lines for same records. I tried to trim but did not work. May be I am not doing it correct. any ideas?
Yes, it's exactly like what you replied & What I want.That's populate Textboxes & at the same time a listbox based on textbox1 keywords. Thanking you in anticipation.
Ok, I will send you a file.
Please send your email id
Thank you Nsutradhar. He help me a lot, he willing to help in short time. Support him !!
Welcome
Good Job EXCELLENT
This the what ive been looking for. Thank you so much.
If it works slow to load, then you can add a command button and replace the same code into the command button.
If you have large data, then it will work slow.
By the way thanks for your valuable feedback
Thank you for this - very useful!
Received your file.Thanks a lot & I've already subscribed your channel.
Ok, thanks
Very Helpful! Kudos to you!
Nice work u doing....
I've solved a problem that I've been very curious about.
I'm subscribed to your video.
I'll study and watch other videos,
Thank you so much.
Thank you
Pls let.me know then
VERY USEFUL
is there anyway you can add another row on the userform? because i have tried another column and add code on it seems to be locked only the current set up
Thank you so mutch, Sir.
SO USEFULL! Thanks a lot!
Hi , I really like your video, Specially the search function. Can you kindly add more function like ADD data...Delete Data...Update Data.... in this project...Thanks
Sir, Actually this code is not accept more than 9 column. I had made more than 9 columns then error shows "could not set library property, invalid property value". Can you help me... I want to increase the column count more than 15, but how???
Up , same problem
Instead of Me.listbox1.additem
Use me.listbox.rowsource = sheet1.name & "!A2:K" Lastrow
how with 2 textbox to filter (2 condition), so textbox1 to filter listbox and textbox2 to filter again the listbox? thanks
Thanks for this video.
I kindly need help here,
if there are 3 worksheets available, how do you then search through these worksheets and display the result in the list-box?
Where to put Blue colour in header sir?
Great Tutorial
Thanks
hi can you make a video like this, whenever the user double click the listbox it will open the pdf file (with the hyperlink from excel table to pdf file) - pdf file that is located at the mapped network (this pc). really appreciate your kind help
Do you have a free form for example ?
I am Textiles engineer. I have to develop an AI where I can compare EPI, PPI, Greige width and gets Finished Width automatically. Please help what should I do...
my system is kinda like this but its not in userform. i want to make it like this but has more criteria for searching to narrow down the search cause mine is dealing with automotive parts. do you have any suggestion. i love your idea. :)
You can try this
th-cam.com/video/TxsjjaWWKFQ/w-d-xo.html
This is one of a kind.
My query is:
If the stock level falls below the minimum level we can do a conditional formatting in excel and show the present stock as red color or set ut to blink.
And in the same way what would be the VBA code to show the same minimum stock level in listbox in high lighted form
Hello sir,
It's not possible to change the colour of an individual item in a listbox or by condition
Hi how to show header in the list box more than 20(mine54header)
Goodmorning sir, i found out that your tutorial was very useful, i tried some double click function on listbox and it will fill those necessary name, but it will always show the header that you created inside list box
What do you want to do by double clicking on listbox?
@@NsutradharI want to fill out the textbox, for example, if I have a textbox for Product name, when I double click the result in the list box, it will fill the textbox with the product name that I double click.
'-------------Data Transfer from ListBox To TextBoxes----
Dim x As Integer
For x = 1 To 9
Me("TextBox" & x).Value = Me.ListBox1.Column(x)
Next x
End If
Next r
@@Nsutradhar thank you so much :) you're so much help
I have more than 30 columns in my project.
The column I want to search for is "F". What should I change in your wonderful code.
Please follow the below process
th-cam.com/video/i1k7Vz9Q-iU/w-d-xo.html
nsutradhar.blogspot.com/p/how-to-use-listboxadditem-method-for.html?m=1
If want search data by Date then??
This is the only video that worked (partially) for me. I have several issues, the search column that I want to search by is my 6th column (column F), can you guide me to how I can do this? also search results are duplicated or occurs 3-4 times as am typing. In general, i don't really understad what i, x and p is...
I have try same code, but the error has been seen in the "me. listbox1.clear " mai error " listbox1=Null" dekha raha hai.
You can send me your file so that I can check and give you better feedback
To below email..
nsutradhar.cob@gmail.com
thank you😃
Do you have free form ?
Bhai ye kam to krta hai lekin kuchh samay bad ye kam nhi krta wo sirf numeric value se hi search krta hai kya issue hai pls reply
how about if the search field that i want to search is in column D? how can i execute? thank you
Just change as follow...
For x = 1 to Len(sh.cells(x, 4))
And change also
If Lcase(Mid(sh.cells(i, 4), x, p)) = ....
......
Excuses me can you show VBA code format lisbox continue with this video
BHAI PATA MHI KYU LEKIN KUTCHH SAMAY BAD WO SHIRF NUMERIC VALUE SE HI SEARCH HOTA HAI
Hi, Very good, but how to do it if we want to use the same textbox to look for a data from another column than the first?
I would really like to know the solution for this case. thank you very much for your availability
nice.....but when i paste text in textbox,then not searching anything.....
Listbox remain blank...pls confirm
It works only when you are typing in textbox bcz the macro is sub textbox_change
You can try this same code in textbox_afterchange
Thanks one more query.
My data have duplicate rows,suggest me how to ignore repetitive items from listbox
@@Nsutradhar please can we be friends so you can help me
i try same code to paste in textbox2 (the program code has been adjusted to column C), but textbox 2 don't filter result of filter textbox1 (column B). Or textbox1 don't filter result of textbox2. please help me.
You can try this for two comnobox
If sheet1.cells(i, 2) = me.combobox1 and sheet1.cells(i,7) = me.combobox2 then
me.listbox1.additem .....
.........
End if
Next i
@@Nsutradhar so i changed code :
if Lcase(Mid(sh.cells(i, 2), x, p)) = me.textbox1 and me.textbox1 " " then
using that code?
Thank you.. it was exactly what I was looking for.. only one additional idea is needed: what if I want to search all columns not only the first one?
please send your email, I will send you a file where you can resolve your issue. & don't forget to subscribe
MORE EASY WAY FOR IT , ADD ONE EXTRA COLOMN AND CONCATINATE ALL THE COLOMN IN THAT COLOMN AND GAVE TH REF. OF THAT COLOMN ..
great lesson. However, I got an issue with my program. my excel data contain both alphabet and numeric in the same cell (eg. b230), whereas the search does not detect alphabet but it search according to number. Need help with this.
Great
Hi, can you make one that has combo box criteria for multiple sheet in addition to this search codes. because I have 8 sheet in a work book and I want categorize using combo box then use this code to search base on a combo box criteria. thank you for sharing your knowledge.
Thanks for your comment. Keep in touch. I will provide you the necessary file.
Please give your email id
Jhunbalmiranez@gmail.com
Thank you and more power to you.
th-cam.com/video/M8qPDwCb2cY/w-d-xo.html
Awesome !
thank you!
Hi sir! Read all your videos.But got no solution.I'm in a fix-what to do.Problem is- I've an excel database with A:H. Among these I want to display data of A,B,C in 3 Textboxes & the left that is D:H in a Listbox simultaneously when i enter any data in textbox1 using an USERFORM. will be so lot appreciated if you do me a favor with a VBA code.Looking forward to you.
Sir, kindly explain and make a video about 'Error in loading DLL' in Microsoft Visual Basic.
Contact me at nsutradhar.cob@gmail.com, I will send you the file & then you can run it
@@Nsutradhar Hello i want to filter data excel with total sum
Dear Sir..
Its fantastic tutorial..
Pls suggest me code that whenever we did last entry from text box press enter on command button... then list box automatically shows last data entry record with selection without scrolling listbox....
Waiting for your genuine reply...
Please write the below code
Me.ListBox1.ListIndex = me.ListBox1.ListCount - 1
before End Sub for your command button.
this is ms officd 365?
office 2016, but it will work on 365. to download this file visit below
nsutradhar.blogspot.com/2020/01/populate-listbox-based-on-textbox.html
What if I Want to search from more than one column? like two-column or more?
You can see 👇
th-cam.com/video/i1k7Vz9Q-iU/w-d-xo.html
I hope you will find your answer..
You can visit my blog also
nsutradhar.blogspot.com/p/view-all.html?m=0
Bhai ye capital later me type kre tab search nhi krta hai ?
Yes, if you want to search by typing small letters, then you need to use Ucase instead of Lcase in vba code
aur agar isme apko kisi vi torh modify korni hai, you can send me your file with full description at nsutradhar.cob@gmail.com
@@Nsutradhar Thanks buddy,
lekin agar dono se karna ho to ?
How can I remove duplicate or many results when tying only 1 letter
It is not possible to remove many same result when you type only single letter. It will repeat your results as per your letter.
You can try another method
nsutradhar.blogspot.com/2020/09/listbox-with-multiple-criteria-in-excel.html?m=1
Please insert the below code befor End Sub. I hope it will work for you
Dim k As Long
Dim j As Long
With ListBox1
For k = 0 To .ListCount - 1
For j = .ListCount - 1 To (k + 1) Step -1
If .List(j) = .List(k) Then
.RemoveItem j
End If
Next
Next
End With
@@Nsutradhar Wow you are amazing! It works well for me. Thank you so much.
hello sir , please can you send me the vba code i'have try but i didin't menage to write the code correctly ! thank you
nsutradhar.blogspot.com/p/how-to-populate-listbox-based-on.html
In the listbox the data I was looking for was found, but below the data, the listbox header appears and there are so many? What caused it? the order of the data in the listbox is like this:
- The first line is the Listbox Header
- second line: The data I'm looking for
- next line: Listbox header (so many)
Use me.listbox.clear at the top of the VBA code
Hi Guru. Is there a fix to the duplicating values in the list box when typing the first character in the text box? Thank you so much for this tutorial. It is very helpful.
Duplicate value occurs bcz suppose you type "s" in TextBox and you have samsung mobile in your database and in Samsung mobile has two s, so that you will show twice in your listbox and when you type in full word it will show single.
Thank you for writing
Hello .please send me the syntax of this code .thinks
Private Sub CommandButton1_Click()
'declare all veriables.......
Dim sh As Worksheet
Set sh = Sheets("PRODUCT LIST")
Dim i As Long
Dim x As Long
Dim p As Integer
Me.ListBox1.Clear
'Set ListBox headers.......
With Me.ListBox1
.AddItem "Search"
.List(0, 1) = "ITEM CODE"
.List(0, 2) = "SUPPLIER"
.List(0, 3) = "ITEM"
.List(0, 4) = "QYT"
.List(0, 5) = "UOM"
.List(0, 6) = "U / PRICE"
End With
'select headers after search.......
Me.ListBox1.Selected(0) = True
'use of i veriables to check each cell values......
For i = 3 To sh.Range("F" & Rows.Count).End(xlUp).Row
For x = 1 To Len(sh.Cells(i, 6))
p = Me.TextBox1.TextLength
' condition apply by which it will search data.....
If LCase(Mid(sh.Cells(i, 6), x, p)) = Me.TextBox1 And Me.TextBox1 "" Then
With Me.ListBox1
.AddItem sh.Cells(i, 6)
.List(.ListCount - 1, 1) = sh.Cells(i, 3)
.List(.ListCount - 1, 2) = sh.Cells(i, 4)
.List(.ListCount - 1, 3) = sh.Cells(i, 6)
.List(.ListCount - 1, 4) = sh.Cells(i, 7)
.List(.ListCount - 1, 5) = sh.Cells(i, 8)
.List(.ListCount - 1, 6) = sh.Cells(i, 9)
End With
End If
Next x
Next i
'------------NSUTRADHAR--------------------------------
End Sub
Hello sir. I have duplicate rows, why?
If you write full word then there will be no duplicate.
And if you write partial then there will be duplicate.
For example, if you write "a" then it will find for those rows contains "a".
Suppose , banana has triple a so it show three times. Thank you
@@Nsutradhar Thanks, sir
Is there a code to filter data in a listbox from a textbox with more than 1 million rows?
download this file and try it
nsutradhar.blogspot.com/2020/08/display-search-results-in-listbox-with.html
hello, it is lucky to see this video. Me.TextBox1 = Format(StrConv(Me.TextBox1, vbLowerCase)) ?? what is the meaning?
Oh, I got it!
Ok
I have tried this, it works at first but I have 25 columns,I already set the columnwidth properties on listbox to 25, however I am getting error when I tried to load column header above 9(I start to 0). "Could not set the list property. Invalid property value." is the error
You can see this
th-cam.com/video/i1k7Vz9Q-iU/w-d-xo.html
@@Nsutradhar Thank you and I was amazed by the solution
i managed to make it but it’s a little bit slow in response, is there a way to speed it a little bit, thanks and great post btw 😊
@Nsutradhar
insert a commandbutton on your userform and cut this code from TextBox1_Change and paste it into the commandbutton. In this way you can speed up
How to display the results in the list box with more than 10 columns/categories?
Please see this video 👇
th-cam.com/video/i1k7Vz9Q-iU/w-d-xo.html
How to indicate minimum stock level in listbox vba
You can create a userform that shows only those items which are below minimum stock level.
If sh.cells(i, 4) < 5 then
Me.listbox1.additem
...........
..........
End if
Why sometimes it cannot function
I can't show more than one column in the list box
You should check Listbox property and change the number of Column count .
Thank you
SUCCESS
Sir when you type "A or C" OR any one character type then show one value multiple time U can see please correct it thanks
Or give me email address I will send you screenshot thank you
actually if you write one letter then it find all values which contains this letter. supposed you want to search "banana" and you type in textbox "a" then it will show you three times banana bcz banana has contains three a
thank you
@@Nsutradhar how do we avoid this showing multiple values?
Please tell sir.
Hi, I wanted to congratulate you on a fantastic job.
But how can I also add the list of colon A ?
If I put column C because the info to be filtered is in column C, in the listbox I can also get out the numbers in column A th-cam.com/video/zaPpkWYnAN4/w-d-xo.html
.
Disturbing background Music Not Good !!!! You should talk and explain !!
Thanks for Your valuable feedback. You may visit for vba code and explanation nsutradhar.blogspot.com
Great Tutorial
Hi sir! Watched your all videos.But got no solution.I'm in a fix-what to do.Problem is- I've an excel database with A:H. Among these I want to display data of A,B,C in 3 Textboxes & the left that is D:H in a Listbox simultaneously when i enter any data in textbox1 using an USERFORM. will be so lot appreciated if you do me a favor with a VBA code.Looking forward to you.
I want more clarification:
That means..
Do you want to get data in textbox 2 and 3 and also listbox when you typing in textbox 1.
Is it your issue? Let me know