Easy Problem that I can't figure out


G

Guest

I just want to search a row for a certain value, and then return the column
number that the value is in. Easy right? but I cant figure it out.

Someone help me.

Thanks,
Cory
 
Ad

Advertisements

G

Guest

Example, in B2: =MATCH(A2,$1:$1,0)
where A2 houses the value to be matched within row1

B2 will return the col "number".
Eg if A2's value is found/matched in C1, B2 will return: 3 (col #3)
 
Ad

Advertisements

T

T. Valko

Do you want the relative column number or the absolute column number?

Assume you have this data in E1:J1

10, 96, 21, 47, 99, 35

You want to lookup the column number for the number 10.

For the relative column number:

A1 = 10

=MATCH(A1,E1:J1,0)

Returns 1

For the absolute column number:

=INDEX(COLUMN(E1:J1),MATCH(A1,E1:J1,0))

Returns 5
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top