Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assume an array of string type, and a string varible. Is
there a function or shortcut way of identifying the index number of the first element whose value matches the value of the variable? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way is Excel's Match function:
Application.Match(lookup_val, arr(), 0) returns either the index position of the value found in the list, or an error if not found, so use a variant and trap the error using IsError. " wrote in message ... Assume an array of string type, and a string varible. Is there a function or shortcut way of identifying the index number of the first element whose value matches the value of the variable? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() -----Original Message----- One way is Excel's Match function: Application.Match(lookup_val, arr(), 0) returns either the index position of the value found in the list, or an error if not found, so use a variant and trap the error using IsError. " wrote in message ... Assume an array of string type, and a string varible. Is there a function or shortcut way of identifying the index number of the first element whose value matches the value of the variable? . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Application.Match is 1-based, so you will need to adjust for 0-based
arrays (or, for that matter, for an n-based array where n is not 1). Alan Beban Tim Zych wrote: One way is Excel's Match function: Application.Match(lookup_val, arr(), 0) returns either the index position of the value found in the list, or an error if not found, so use a variant and trap the error using IsError. " wrote in message ... Assume an array of string type, and a string varible. Is there a function or shortcut way of identifying the index number of the first element whose value matches the value of the variable? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I search for the second largest value in the array? | Excel Worksheet Functions | |||
array search | Excel Worksheet Functions | |||
Please help on array search & result | Excel Worksheet Functions | |||
search array | Excel Worksheet Functions | |||
Text Search in an Array | Excel Worksheet Functions |