VBA Help Search function

CleverTiger

New Member
Joined
Nov 26, 2012
Messages
3
I am working on a troubleshooting guide for powdercoat applications for work. I have a macro setup that brings up an input box upon opening the file, and it seaches a "tags" column for what the user inputs and returns what the potential problem and solutions are to those problems. the issue that i am having is that if the user doesn't word their query exactly like the problem is stated then they return no solutions. For example, the user may input "Fluidized bed not operational" but if the problem is worded "Fluidized bed not functioning" it isn't returning a solution. that's why i put in the "tags" column which contains things like "fluidize, fluidized, bed, hopper, working, functioning, not" and so on.

My current problem is that the macro is looking for exacly what the user inputs. so if they say "not funcioning" they may not get a return. I want the macro to return the rows that contain any of the words they use... that way if "not" is in my tag column it will return a solution for "not operational" even though they typed "not functioning". is this possible?

here is my code:

Sub Find_Problem()
Worksheets("Problem Entry").Activate
Dim Message, Title, Default
Dim MyValue As String
Message = "Enter brief problem description" ' Set prompt.
Title = "Troubleshoot Search" ' Set title.
Default = "" ' Set default.
' Display message, title, and default value.

Worksheets("Data").Range("$A$5:$E$254").AutoFilter Field:=5 ' Tags column
MyValue = InputBox(Message, Title, Default, 6900, 5800)
Myvalue1 = "*" & MyValue & "*"
Worksheets("Data").Range("A1").AutoFilter Field:=5, Criteria1:=Myvalue1

Worksheets("Data").Select
End Sub


Thanks!
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,215,529
Messages
6,125,344
Members
449,219
Latest member
Smiqer

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top