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

[HELP] How to make search query VB work?

Demention

New Member
Hi everyone!

Thanks for reading my thread.

So my mum has her own little business making home-made brownies, fudge, rocky road and an assortment of other things. With my recent ventures I was looking into making her computer work a bit easier.

I found a cool article about creating a search box:
https://www.excelcampus.com/tools/find-all-vba-form-for-excel/
It allows you to type in a text box with results in a list box and the results are narrowed down as you type, like a Google search.

I'd really like to use this method for my mum to find her way around the worksheet and to make it easier for her. She's always asking me to help her and she's not good with remembering all the shortcuts.

I tried using the code as it is but I get errors when trying to use the userform. I'm not sure if it would be possible, but if it is, I'd like her to be able to search though columns A,C,D with keywords (for column D especially).

Wanted to paste the code here, but message is too long. If anyone would be able to help with this, you'd be making my mum (and I) very happy.

Thanks for your time and patience!

edit: For Excel 2013
 

Attachments

  • Demention.xlsm
    43.7 KB · Views: 4
Hi Nebu,

Thanks for the hasty reply. I had a look at the thread and it's not what I'm looking for. It seems quite "clunky" and could be hard for my mum to use.

In my sample workbook I've only included one item, with multiple sub options. But more things will be added as my mum makes a bunch of different things, each with their own sub options.

Unless I use something like this:
http://chandoo.org/wp/2015/08/22/filter-as-you-type-excel/

But would preferably like it to filter through all data and not just one column and I have no idea how to do it.

Thanks
 
That is fantastic! Thanks a lot!

Within the listbox where it shows the cell location, how would I go about displaying the description instead when searching the number in A?

In the meantime I'm having a look at the listbox code, but it doesn't tell me anything obvious to change.

Thanks again for that!
 
Think it might be this line:
Code:
arrResults(lFound, 2) = "'" & FoundCell.Parent.Name & "'!" & FoundCell.Address(External:=False)
 
Hi Nebu
Sorry for the late reply, I've been away for a bit. That works perfectly Thank you so much.
Thanks again mate
 
Back
Top