This is absolutely awesome, there are very few that implement a userform for this type of search, that you can actually follow along and can tweak to get it into your own project. Thank you for you time in putting this out for the masses. Not sure why you didn't post the actual code as well, but that made for a better understanding
Excellent. You're great VBA teacher. Thanks for your best code and another useful tutorial. Your code works like miracle. All thumbs up. Already subscribed
You didn't show how the header of each of the 9 columns is placed at the end of the video, we were left with the form without the header of the columns?
loved this! I'll test this on the project I am currently working on. Is it possible to conduct the search anywhere in the criteria? For example, if I type or, it will show the result of any word that has letters "or" and not just the one that starts with or?
good but could have been better and faster to work with the large table by using filtering the table using Wildcard(*) and coping the data to a temp sheet and then bringing the data in the list box with range. by converting the data in to the table it gives whole lot of functions to use for us and still keeping all the sheet functions also.
vba excel, A1 type a few characters (if it supports Vietnamese, even better), B1 is the directory path to search, when found in B1 the word or excel file contains the same content as A1, then will return results from C1 down: the search path to the folder containing the word or excel file, the result contains content identical to A1 (including the file name). please help me
thank you very much for clear presentation i write the code but nothing display on listbox2 my column is 4 ======= Dim criterion Private Sub ComboBox1_Change() Dim c As Integer Dim column_headers column_headers = Array("A", "B", "C", "D") For c = 1 To 4 If Sheet2.Cells(1, c).Value = Me.ComboBox1.Value Then criterion = column_headers(c - 1) End If Next Sheet2.Cells(1, "K").Value = criterion Me.ListBox2.Clear Me.TextBox1.Value = "" Me.TextBox1.SetFocus End Sub Private Sub TextBox1_Change() On Error Resume Next If Me.TextBox1.Text = "" Then Me.ListBox2.Clear Exit Sub End If Me.ListBox2.Clear Dim r, last_row As Integer last_row = Sheet2.Range(cell1).End(xlUp).Row For r = 2 To last_row a = Len(Me.TextBox1.Text) If UCase(Left(Sheet2.Cells(r, criterion).Value, a)) = UCase(Me.TextBox1.Text) Then With Me.ListBox2
.AddItem Sheet2.Cells(r, "A").Value .List(.ListCount - 1, 1) = Sheet2.Cells(r, "B").Value .List(.ListCount - 1, 2) = Sheet2.Cells(r, "C").Value .List(.ListCount - 1, 3) = Sheet2.Cells(r, "D").Value End With End If Next
End Sub Private Sub UserForm_Initialize() Dim c As Integer For c = 1 To 4 Me.ComboBox1.AddItem Sheet2.Cells(1, c).Value Next With Me.ListBox2 .ColumnCount = 4 .ColumnWidths = "80;80;80;80" End With End Sub =====
This is absolutely awesome, there are very few that implement a userform for this type of search, that you can actually follow along and can tweak to get it into your own project. Thank you for you time in putting this out for the masses. Not sure why you didn't post the actual code as well, but that made for a better understanding
Excellent. You're great VBA teacher. Thanks for your best code and another useful tutorial. Your code works like miracle. All thumbs up. Already subscribed
You are welcome
How do you display more than 10 columns in the list box? Only able to show 9
You didn't show how the header of each of the 9 columns is placed at the end of the video, we were left with the form without the header of the columns?
sir 10 above loop posible or not ?
sir, it shows an error - variable a is not defined. How can I solve this
same
Add "Dim a" to the top of the form, first line
Is the Excel file used in the demonstration available for download? I did not see the link.
with this code is it possible than when you double click the listbox data will display on texboxes?
How to search listbox name midlename last name.. Example.. In textbox type..A B C.. result..Adi Bike Care in vba please vba code..
How to get the header on list box. . Isn't explained but finally on there how????
Same
same, i used “listbox1.clear” and this make listbox has no headers 😢
yeah, i use rowsource
@@angelou8633 How did you used that? I am trying but facing problem, can you please help?
@@RAHIMPHYSICS ua-cam.com/video/TuInj-DJ80A/v-deo.html
loved this! I'll test this on the project I am currently working on. Is it possible to conduct the search anywhere in the criteria?
For example, if I type or, it will show the result of any word that has letters "or" and not just the one that starts with or?
how i want add column detals like you with color green please see in last scene 12:55
Please help
this only work for 9 column ia any way to use more than 10 columns
Hi, I'm getting the error variable not defined on a = Len(Me.TxtSearch.Text) where can I set the A variable?
Hello, can we have something similar when the user form is connected to a MS Access with a set of data..is there any video on this?
I tried to correct the codes for the listview. But I couldn't. Can you edit the codes for the listview? Thank you.
good but could have been better and faster to work with the large table by using filtering the table using Wildcard(*) and coping the data to a temp sheet and then bringing the data in the list box with range. by converting the data in to the table it gives whole lot of functions to use for us and still keeping all the sheet functions also.
Sir I need help 🙏
Why this search method is working slow when data is more than 100 and searh textbox responding very slow. Please give the solution .
yeah , it loads very slow. did you find a solution?
vba excel, A1 type a few characters (if it supports Vietnamese, even better), B1 is the directory path to search, when found in B1 the word or excel file contains the same content as A1, then will return results from C1 down: the search path to the folder containing the word or excel file, the result contains content identical to A1 (including the file name). please help me
My code don't work, the informations are not showed in listbox after all, anyone have a tip for the solution?
Same here
How can I see more than 9 columns?
the a= Len ... line is giving ERROR
i don't know but error13
why? how to correct
sir , how to search text in the middle?
it shows only first column, please help
Go to the properties of your ListBox, and increase the ColumnCount to the number of Columns you want to see. Maybe this helps.
First row header is not fix how to solve
no display on listbox
first thanks for your comment. i think you need to initialize the event. it's explained from 4:24 to 5:34
can u send me the file
Use "search for" 🙄
thank you so much
you are welcome
thank you very much for clear presentation
i write the code but nothing display on listbox2
my column is 4
=======
Dim criterion
Private Sub ComboBox1_Change()
Dim c As Integer
Dim column_headers
column_headers = Array("A", "B", "C", "D")
For c = 1 To 4
If Sheet2.Cells(1, c).Value = Me.ComboBox1.Value Then
criterion = column_headers(c - 1)
End If
Next
Sheet2.Cells(1, "K").Value = criterion
Me.ListBox2.Clear
Me.TextBox1.Value = ""
Me.TextBox1.SetFocus
End Sub
Private Sub TextBox1_Change()
On Error Resume Next
If Me.TextBox1.Text = "" Then
Me.ListBox2.Clear
Exit Sub
End If
Me.ListBox2.Clear
Dim r, last_row As Integer
last_row = Sheet2.Range(cell1).End(xlUp).Row
For r = 2 To last_row
a = Len(Me.TextBox1.Text)
If UCase(Left(Sheet2.Cells(r, criterion).Value, a)) = UCase(Me.TextBox1.Text) Then
With Me.ListBox2
.AddItem Sheet2.Cells(r, "A").Value
.List(.ListCount - 1, 1) = Sheet2.Cells(r, "B").Value
.List(.ListCount - 1, 2) = Sheet2.Cells(r, "C").Value
.List(.ListCount - 1, 3) = Sheet2.Cells(r, "D").Value
End With
End If
Next
End Sub
Private Sub UserForm_Initialize()
Dim c As Integer
For c = 1 To 4
Me.ComboBox1.AddItem Sheet2.Cells(1, c).Value
Next
With Me.ListBox2
.ColumnCount = 4
.ColumnWidths = "80;80;80;80"
End With
End Sub
=====
thanks
Super
Thank you
Excellent
Thank you! Cheers!
Thank you very much
You are welcome
harika
Thank you
Na ismeaapne search की कोई coding ki hai kuch kaam nhii kar raha pagal बना रहे हो ना Sheet downloads की try के liye
Sir
31 March 2024 file expired हो जाएगा 1st अप्रैल open ओपन करने के लिए पासवर्ड देना होगा Excel VBA code कैसे लिखो लिखें