• 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.

I Would like to get a code to search some information from my file

Fred Wayne

Member
I have created a userform. That Userform will contain all information of "Master Sheet". I want all data from "Master Sheet" to be displayed in the ListBox. If I click on any value from that ListBox, I would like all data to fill the corresponding TextBoxes on top. The same way with the "TYPE TO SEARCH" TextBox====> I would like that when I type any value on that TextBox, it filters and display the corresponding match. Of course, after filtering and clicking on any searched value, the TextBoxes on top to display the corresponding information.

I am attaching images and the original file with the Userform.


Thank you so much in advance.
 

Attachments

  • New Test Wayne (1).xlsm
    292.7 KB · Views: 6
  • Search.JPG
    Search.JPG
    168.8 KB · Views: 12
I don´t understand what you mean? Clear for others in which sense? I am doing anything wrong? All I am doing is requesting for help! Please accept my apologies if I am doing anything wrong!
 
Fred Wayne
If your thread is clear to others,
you would have already received many answers.
You can continue waiting or more information/details about your thread.
 
Fred Wayne
As I've tried to explain,
You should write more details to next reply below this my reply.
After that You would get replies, if those are clear for others.
Do not open a new third thread from same challenge!
 
Yes exactly! Perfect!

Now the button "Type to search". I would like to search(filter) a project when I type. And I´d love the textboxes to automatically fill with the information of the searched project.

Thank you so much.
 

Attachments

  • Capture.JPG
    Capture.JPG
    178.8 KB · Views: 2
  • New Test Wayne (1).xlsm
    295.4 KB · Views: 2
Wow.!!!!!..Very close!.

The "Type to Search" Textbox, filters but not does not match criteria. I´d love that TextBox11 to filter the criteria that is under all column "D7:D10000".
Thank you so much.

You are amazing.
 

Attachments

  • Capture.JPG
    Capture.JPG
    293.3 KB · Views: 3
  • New Test Wayne (1) (1).xlsm
    301.8 KB · Views: 3
I mean the data that is all column D. I need that the Textbox11 filters the data based on the column "D" of the worksheet. Please accept my apology for not being very specific.
Once again...thank you in advance.
 
Hi
Let me know If this fulfill your requirement
 

Attachments

  • New Test Wayne Final.xlsm
    306.7 KB · Views: 6
I opened the file you sent me. When I type to search...it filters but none of the searched criteria matches with what I am searching.
 

Attachments

  • Capture.JPG
    Capture.JPG
    165.6 KB · Views: 6
  • Capture2.JPG
    Capture2.JPG
    72.5 KB · Views: 6
  • New Test Wayne Final.xlsm
    306.7 KB · Views: 4
Capture2.JPG
Seems You don't respect capital & Small letters while searching, this can be solved easily.

Capture.JPG
But, How On earth You expect to find Lip... when you type LP Or lp in search box? What is the logic you think? Please clarify
 
Yes you're right. Please Accept my deepest apologies. I don't really know what I was thinking for!. You got it as usually. Thank you very much.
 
The job you did is extremely awesome, and I do really give 2Thumbs up for everything you have done. But now I am having a little issue. Is there a way to fix this: every time I delete all date in column "D", I have an error. I guess it is because when all data of "D" is cleared, the ListBox pops the error "Application-Defined or object error". Could it be possible to fix it?

Once again.

Thank you so much in advance.

You are simply amazing.
 

Attachments

  • Capture.PNG
    Capture.PNG
    43.7 KB · Views: 4
With this
- The error issue sorted out.
- Type to search is not case sensitive Now
 

Attachments

  • New Test Wayne Final MODIFIED.xlsm
    307.4 KB · Views: 7
Hello again. I am so sorry. I have another situation...Let me try to explain...My workbook has several sheets. Last time you helped to make all the information of all the sheets to consolidate it into one sheet which is called "Master Sheet". What you did was super amazing(As Usually). But I have noticed something that I haven´t seen before. When I delete information(Information that I don´t need) from sheets, and then when I try to consolidate, it pops me up an error. The same error as before "Run-time error '1004': Application-Defined or object error". But if I put information in the sheets again...the error stops. So it means if I consolidate all sheets in 1 but some sheets are empty without data, the error pops up! Could it be possible to avoid this error?

Thank you so much.
 

Attachments

  • Capture.JPG
    Capture.JPG
    117.1 KB · Views: 4
  • Capture2.JPG
    Capture2.JPG
    64.2 KB · Views: 4
  • New Test Wayne Final MODIFIED.xlsm
    307.4 KB · Views: 6
Ok,
Replace the macro in Module1 with

Code:
Sub consolidate()
    Dim C As New Collection
    Dim a, b As Variant
    Dim arr
    Dim i, ii, l, lr
    ii = 1
    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual
    Application.EnableEvents = False
    arr = Array("1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", "10th", "11th")
    ReDim d(1 To UBound(arr) + 1)
    For i = 1 To UBound(arr) + 1
        With Sheets(arr(i - 1))
            lr = .Cells(Rows.Count, 2).End(xlUp).Row - 6
            If lr <> 0 Then
                a = .Cells(1, 1).Offset(6).Resize(lr, 10)
                C.Add a
                d(ii) = Array(C): ii = ii + 1
            End If
        End With
    Next
    l = 1
    For i = 1 To ii - 1
        Sheets("Master Sheet").Range("A" & l + 1, "J" & l + UBound(d(i)(0)(i))) = d(i)(0)(i)
        l = l + UBound(d(i)(0)(i))
    Next
    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationAutomatic
    Application.EnableEvents = True
End Sub
 
Back
Top