abenitez77
Board Regular
- Joined
- Dec 30, 2004
- Messages
- 149
Is there an IN function in excel vba that I can use ?
In SQL I can do something like this:
Select * from table where field IN('value1','value2','value3','value4')
Is there something similar that I can do in Excel?
I have this If statement below that I want to do this to:
If LCase(xSheetName) = "price strat export" Or LCase(xSheetName) = "a-b-c moves 2" Or LCase(xSheetName) = "test" _
Or LCase(xSheetName) = "forecasts" Or LCase(xSheetName) = "q4 skeleton" Or LCase(xSheetName) = "ly space and sales" _
Or LCase(xSheetName) = "p_template" Or LCase(xSheetName) = "fills" Or LCase(xSheetName) = "input plan" _
Or LCase(xSheetName) = "customer" Then
GoTo NextCounter
End If
In SQL I can do something like this:
Select * from table where field IN('value1','value2','value3','value4')
Is there something similar that I can do in Excel?
I have this If statement below that I want to do this to:
If LCase(xSheetName) = "price strat export" Or LCase(xSheetName) = "a-b-c moves 2" Or LCase(xSheetName) = "test" _
Or LCase(xSheetName) = "forecasts" Or LCase(xSheetName) = "q4 skeleton" Or LCase(xSheetName) = "ly space and sales" _
Or LCase(xSheetName) = "p_template" Or LCase(xSheetName) = "fills" Or LCase(xSheetName) = "input plan" _
Or LCase(xSheetName) = "customer" Then
GoTo NextCounter
End If