I need to find a solution using Function and not code. In an array of multiple columns each with multiple rows of values, I need to find the location/cell of a value so that I can retrieve the column heading.

As a small example below if I have value C3, I want to find that the value is in column 3 row 3 of the array so I can extract heading Y. But if a value K9 is searched for it needs to results in an error

W X Y Z
A1 B1 C1 D1
A2 B2 C2 D2
A3 B3 C3 D3
A4 B4 C4 D4

I have tried 'Match' but that only works on a single column array. 'Lookup' will provide a heading but it will also provide a heading even if the value isn't found.

Any suggestions would be appreciated. Thank you