Hi
I am using the following formula to determine if a value is in a list. The list is in a range named “Region”.</SPAN>
Sub OnTheList()</SPAN>
Dim a As Long 'variable assigned the results of the evaluate method</SPAN>
Dim b As String 'variable assigned the value from the inputbox
</SPAN>
b = InputBox("Enter the name of the sheet you want to add")
a = Evaluate("=IFERROR(MATCH(b,region,0),0)")</SPAN>
End Sub</SPAN>
The user through an inputbox is prompted to enter a value. The value is assigned to a variable called “b” Variable “b” is then used in the evaluate method in the next line of code.</SPAN>
The match formula is not recognizing the variable “b”. The evaluate formula does work when I hard code a value instead of using a variable.</SPAN>
I am obviously overlooking something, any help would be greatly appreciated</SPAN>
Thanks</SPAN>
Steve</SPAN>
I am using the following formula to determine if a value is in a list. The list is in a range named “Region”.</SPAN>
Sub OnTheList()</SPAN>
Dim a As Long 'variable assigned the results of the evaluate method</SPAN>
Dim b As String 'variable assigned the value from the inputbox
</SPAN>
b = InputBox("Enter the name of the sheet you want to add")
a = Evaluate("=IFERROR(MATCH(b,region,0),0)")</SPAN>
End Sub</SPAN>
The user through an inputbox is prompted to enter a value. The value is assigned to a variable called “b” Variable “b” is then used in the evaluate method in the next line of code.</SPAN>
The match formula is not recognizing the variable “b”. The evaluate formula does work when I hard code a value instead of using a variable.</SPAN>
I am obviously overlooking something, any help would be greatly appreciated</SPAN>
Thanks</SPAN>
Steve</SPAN>