Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check if a String is inside an Array
No; but if the functions in the freely downloadable file at
http://home.pacbell.net/beban are available to your workbook, the coding can look simpler (the looping is within the function): Replace the loop with If ArrayCountIf(MyArray, A) 0 Then _ MsgBox "it's there" Else MsgBox "it's not" Alan Beban Luis Carrion wrote: Hi, If I were to check if a variable: A="Test" is inside a list of possible strings,I´ll do this: Dim A as string Dim B as variant Dim MyArray As variant MyArray=Array("Test", "This") For Each B in MyArray If A=B then Msgbox "It´s inside the group Next A Is it possible to test this in other way; something like this If A is in/like MyArray then....... ---without looping inside the array Thanks. LC |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Check for NON-presence of a string in another string | Excel Worksheet Functions | |||
Searching for a string of text inside a column | Excel Worksheet Functions | |||
how can I check for cell focus inside a spreadsheet ? | Excel Worksheet Functions | |||
Need macro to insert text string while inside cell (formula) | Excel Discussion (Misc queries) | |||
Check if a String is inside an Array | Excel Programming |