return a column no

  • Thread starter Thread starter Craig McLaughlin
  • Start date Start date
C

Craig McLaughlin

I have a cell containing text. I need a formula that takes the text and
finds an exact match in a row and return the column no.

Eg

Find Text: Name3


Name1 Name2 Name3 Name4 Name5


I want to return the column number which in this case is row 3.

I know there is a simple formula but I cant find it

Thanks
 
=match(a2,1:1,0)
will return the number of the column of the first match (if there is one).

Assumes that the Name3 is in A2 and the names are listed in A1:IV1 (row 1)
 
A1 = Name3

A5:E5 = Name1,Name2,Name3,Name4,Name5

This will return the *relative* position of the lookup_value in the
lookup_array:

=MATCH(A1,A5:E5,0)

=3
 
thanks to everyone for their help

Craig


Dave Peterson said:
=match(a2,1:1,0)
will return the number of the column of the first match (if there is one).

Assumes that the Name3 is in A2 and the names are listed in A1:IV1 (row 1)
 
Back
Top