Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For whatever reason, I'm stuck on this problem.
I know how to loop through an Array and then 'do things' if my test item is in the array: Dim Arr(1 to 4) as String, Element as Variant 'code assigning values to Arr(1 to 4) here For Each Element in Arr If InStr(StartString, Element) 0 Then Call 'subroutine here Next What I'm trying to do is to do things if Element is Not in StartString. I've thought about putting a nested Boolean in the loop, default it to False, loop through the entire array and swap it to True if there's a hit, then test the Boolean to determine to take the next action or not: Dim Tester as Boolean, Element as Variant, Arr(1 to 4) as String 'code assigning values to Arr(1 to 4) here Tester = False For Each Element in Arr If InStr(StartString, Element) 0 Then Tester = True Next If Tester = True Then Call 'subroutine here Is there a more effective/efficient way to accomplish this? Am I trying to overcomplicate it and this is the best route to take? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Logic Test ? | Excel Worksheet Functions | |||
MORE THAN ONE LOGIC TEST | Excel Worksheet Functions | |||
Need help on Logic test!!! | Excel Discussion (Misc queries) | |||
logic test | New Users to Excel | |||
Logic test | Excel Programming |