ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   finding a value in a list (https://www.excelbanter.com/excel-programming/325182-finding-value-list.html)

Gixxer_J_97[_2_]

finding a value in a list
 
if you have a named list, say 'Names'
and that list is used as the source for a data validation cell,
is there a way to find what position the selected value is at in the list?

ie if Names contains:
Frank
Bob
Joe
Tim

and I have selected 'Joe' in my cell, how do i find that 'Joe' is index # 3
(if it starts from 1, or index #2 if it starts from 0)?



Tom Ogilvy

finding a value in a list
 
=match(cell with validation, validation range/list,0)

--
Regards,
Tom Ogilvy

"Gixxer_J_97" wrote in message
...
if you have a named list, say 'Names'
and that list is used as the source for a data validation cell,
is there a way to find what position the selected value is at in the list?

ie if Names contains:
Frank
Bob
Joe
Tim

and I have selected 'Joe' in my cell, how do i find that 'Joe' is index #

3
(if it starts from 1, or index #2 if it starts from 0)?





Gixxer_J_97[_2_]

finding a value in a list
 
thanks Tom!

J

"Tom Ogilvy" wrote:

=match(cell with validation, validation range/list,0)

--
Regards,
Tom Ogilvy

"Gixxer_J_97" wrote in message
...
if you have a named list, say 'Names'
and that list is used as the source for a data validation cell,
is there a way to find what position the selected value is at in the list?

ie if Names contains:
Frank
Bob
Joe
Tim

and I have selected 'Joe' in my cell, how do i find that 'Joe' is index #

3
(if it starts from 1, or index #2 if it starts from 0)?







All times are GMT +1. The time now is 11:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com