ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Lookup for a value in a table (https://www.excelbanter.com/excel-programming/428123-lookup-value-table.html)

T.Mad

Lookup for a value in a table
 
Hi there,
I wonder if anyone can give me a good piece of advice in how to find a
specific value in a table. For example I have the next table:
A B C
1 JOHN MICHAEL MAURO
2 GEORGES STEVEN MARY
3 KIM YAN ANN

I want to find the coordinates of the word MARY. Thus, I need two lookup
functions one which will return the ROW of this word (2nd) and one which will
return the COLUMN of this word (3rd).
The problem with the existing lookup functions (eg MATCH) is that they can
only accept an array to lookup and not a two dimensional table. Please
correct me if I am wrong.
Is it possible to do it with macro functions?
Many thanks
Theo

Bob Phillips[_3_]

Lookup for a value in a table
 
To get the row, use this array formula

=MIN(IF(A1:C6="Mary",ROW(A1:C6)))

and the column

=MIN(IF(INDEX(A1:C6,MIN(IF(A1:C6="Mary",ROW(A1:C6) )),0)="Mary",COLUMN(A1:C6)))

in the latter you can replace the first formula that is embedded within by a
refrence to the cell with the first

--
__________________________________
HTH

Bob

"T.Mad" wrote in message
...
Hi there,
I wonder if anyone can give me a good piece of advice in how to find a
specific value in a table. For example I have the next table:
A B C
1 JOHN MICHAEL MAURO
2 GEORGES STEVEN MARY
3 KIM YAN ANN

I want to find the coordinates of the word MARY. Thus, I need two lookup
functions one which will return the ROW of this word (2nd) and one which
will
return the COLUMN of this word (3rd).
The problem with the existing lookup functions (eg MATCH) is that they can
only accept an array to lookup and not a two dimensional table. Please
correct me if I am wrong.
Is it possible to do it with macro functions?
Many thanks
Theo




Mike H

Lookup for a value in a table
 
Please don't multi post, you have an answer in worksheet functions

"T.Mad" wrote:

Hi there,
I wonder if anyone can give me a good piece of advice in how to find a
specific value in a table. For example I have the next table:
A B C
1 JOHN MICHAEL MAURO
2 GEORGES STEVEN MARY
3 KIM YAN ANN

I want to find the coordinates of the word MARY. Thus, I need two lookup
functions one which will return the ROW of this word (2nd) and one which will
return the COLUMN of this word (3rd).
The problem with the existing lookup functions (eg MATCH) is that they can
only accept an array to lookup and not a two dimensional table. Please
correct me if I am wrong.
Is it possible to do it with macro functions?
Many thanks
Theo



All times are GMT +1. The time now is 11:09 PM.

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