2Is there any Excel function that can copy culumn's (first row's) name if the value matches?Is there any Excel function that can copy culumn's (first row's) name if the value matches?# Is there any Excel function that can copy culumn's (first row's) name if the value matches?

1

2 answers

You can do it with

```
=INDIRECT(ADDRESS(1; MATCH(1;E2:ZZ2)+4))
```

The inner **MATCH** searched for "1" in the given array (from E2 to ZZ2). The "+4" is there, because you are beginning to search in column E (=5) and MATCH returns the column within your array.

The **ADDRESS** takes the first row and the column found by MATCH.

The **INDIRECT** returns the value of the given ADDRESS.

If you copy this formula down the rows, the search array (E2:ZZ2) is automatically adjusted to search the corresponding row.

Source: link

Replace semicolon with comma if your Excel version needs it.

If you have, you can also use Xlookup, it's a bit easier.