Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Something like:
Option Explicit Sub testIt() Dim x(1 To 10), i As Integer For i = 1 To 10 x(i) = Chr(64 + i) Next i On Error Resume Next i = Application.WorksheetFunction.Match("harry", x, 0) MsgBox "harry " & IIf(Err.Number 0, "not ", "") & "found" Err.Clear x(UBound(x)) = "harry" i = Application.WorksheetFunction.Match("harry", x, 0) MsgBox "harry " & IIf(Err.Number 0, "not ", "") & "found" On Error GoTo 0 End Sub -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article , ottomocobia97 @bellsouth.net says... Excel 2002, WinXP I built an array of people's names, say People(). I want to find out if Harry is in that array. I don't want to find Harry's position within the array, just if he is in the array. How would I code that search? Thanks for your help. Otto |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Searching for data in an array. | Excel Discussion (Misc queries) | |||
Searching/Counting an array | Excel Discussion (Misc queries) | |||
Searching for a value in an Array | Excel Worksheet Functions | |||
searching in an array | Excel Discussion (Misc queries) | |||
Searching for a criteria in array of cells within an IF statement | Excel Worksheet Functions |