Home > Back-end >  How to find the row index of a particular value from a table?
How to find the row index of a particular value from a table?

Time:09-28

I want to return the row header value for a particular value.

A 1 2 3 
B 4 5 6
C 7 8 9

For example, if the value is 5 it should return B.

here the digits and alphabet represent Date data type.

I tried

=INDEX(A1:A3,MATCH(C3,B1:D3,0),1)

but it can't be applied in the case of multiple columns.

CodePudding user response:

Can try-

=INDEX(A1:A3,MAX(ROW(A1:A3)*(B1:D3=F1)))

enter image description here

CodePudding user response:

Assuming you just have a single value that would equal your search-value:

=INDEX(A1:A3,SUMPRODUCT((B1:D3=5)*(ROW(B1:D3))))

If you have Microsoft365, you could try:

=CONCAT(IF(B1:D3=5,A1:A3,""))
  • Related