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!
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!