Searching an array of cells for a value and returning the column headers where a value exists

Mattyastill

New Member
Joined
Nov 27, 2017
Messages
23
Hi,

I'm trying to find a way which i can return the column headers where a value exists in the cells F:M for the same row. As you can see from the screenshot for the first row, i would like to search for any value in row 3 and bring back the column heads for the rows. I have shown in Column N of what i would like to return if there is a value there.

I have tried a combination of Index, Match Index, Max and Index, Sum-product but just cant seem to get it working.

1576156578052.png



Any help would be much appreciated

Thanks,

Matthew
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
What version of Xl are you using?
 
Upvote 0
In that case try
=TEXTJOIN(", ",1,IF(F3:M3<>"",F2:M2,""))

This will need array entry, Ctrl Shift Enter, unless you have the new Dynamic Array Functions
 
Upvote 0
In that case try
=TEXTJOIN(", ",1,IF(F3:M3<>"",F2:M2,""))

This will need array entry, Ctrl Shift Enter, unless you have the new Dynamic Array Functions

Ahhh yes that works perfectly thanks so much, only issue is in some of my columns further down in the data there are 0's rather than all being blank. Could there be additional criteria added to this so it ignores blanks and 0's?
 
Upvote 0
How about
=TEXTJOIN(", ",1,IF((F3:M3<>"")*(F3:M3<>0),F2:M2,""))
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top