I want to return a list of headers wherever there is a value match in column N. Where TRUE exists in any row of a column, that header is returned plus

Wad Mabbit

Board Regular
Joined
Mar 31, 2016
Messages
74
Office Version
  1. 2016
Platform
  1. Windows
test-sheet-apr-13.jpg



I want to return a list of headers in column R
XLshot.jpg
wherever there is a value match in column N.
Column n contains extracted phone numbers, which I use as ID's

Where TRUE exists in any row of a column AB to AK,

that header (AB1 .. AK1)) is returned plus a line break,

for each of columns AB:AK where there is any TRUE in a row that has the same number.

So if I have mattches in N5, N8 and N9 any TRUE matches in AB5, AB8, AB9 ... AK5, AK8, AK9 return the headers in AB1, AB1, AB1


E.g. N5, N8 and N9 share a phone number 0411 222 333
AB5, AC5, AD5 are TRUE
AF8, AG8 are TRUE
AK9 is TRUE

Therefore columns AB, AC, AD, AF, AG and AK are triggers to return the headers AB1, AC1, AD1, AF1, AG1 and AK1
...with a line break, say Char(10) to separate them.


What am I doing? I have an appointment record where I record subjects covered. I would like to list what subjects have been covered so that I can focus on thos not yet covered. So I hope to generate a list for each appointment as a checklist.

The first image is Google Sheets. The 2nd is Excel 365. I prefer a solution to Sheets, but would like both (if different).

Thanks in advance for helping with this brain twister..
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
So far I using this formula:

=IF(OR(chkMoreInfo=FALSE,chkMoreInfo="",ISBLANK(E967), Q967=""),"",
T(N("Checking for MHPT; find a matching phone number in column N for INDEX to pull 'MHPT' from column K")) &
IF(INDEX($N$5:$N$1369,T(N("Find phone number matches in column N >")) & MATCH($Q967, $Q$5:$Q$1369, FALSE),T(N("Find 'MHPT' matches in column 1 (K)")) & 1)="MHPT","Has done MHPT " & Char(10),"") &

T(N("Collating theory covered; find a matching phone number in column N for INDEX to pull a TRUE from columns R:AA")) &
IF(INDEX($U$5:$AD$1369,T(N("Find phone number matches in column N >")) & MATCH($Q967, $Q$5:$Q$1369, FALSE),T(N("Convert match in column 1 (R) to header value")) & 1)="",""," 1 " & $U$1 & Char(10)) &
IF(INDEX($U$5:$AD$1369,MATCH($Q967, $Q$5:$Q$1369, FALSE),T(N("Convert match 2 (S) >")) & 2)="",""," 2 " & $V$1 & Char(10)) &
IF(INDEX($U$5:$AD$1369,MATCH($Q967, $Q$5:$Q$1369, FALSE),T(N("Convert match 3 (T) >")) & 3)="",""," 3 " & $W$1 & Char(10)) &
IF(INDEX($U$5:$AD$1369,MATCH($Q967, $Q$5:$Q$1369, FALSE),T(N("Convert match 4 (U) >")) & 4)="",""," 4 " & $X$1 & Char(10)) &
IF(INDEX($U$5:$AD$1369,MATCH($Q967, $Q$5:$Q$1369, FALSE),T(N("Convert match 5 (V) >")) & 5)="",""," 5 " & $Y$1 & Char(10)) &
IF(INDEX($U$5:$AD$1369,MATCH($Q967, $Q$5:$Q$1369, FALSE),T(N("Convert match 6 (W) >")) & 6)="",""," 6 " & $Z$1 & Char(10)) &
IF(INDEX($U$5:$AD$1369,MATCH($Q967, $Q$5:$Q$1369, FALSE),T(N("Convert match 7 (X) >")) & 7)="",""," 7 " & $AA$1 & Char(10)) &
IF(INDEX($U$5:$AD$1369,MATCH($Q967, $Q$5:$Q$1369, FALSE),T(N("Convert match 8 (Y) >")) & 8)="",""," 8 " & $AB$1 & Char(10)) &
IF(INDEX($U$5:$AD$1369,MATCH($Q967, $Q$5:$Q$1369, FALSE),T(N("Convert match 9 (Z) >")) & 9)="",""," 9 " & $AC$1 & Char(10)) &
IF(INDEX($U$5:$AD$1369,MATCH($Q967, $Q$5:$Q$1369, FALSE),T(N("Convert match 10 (AA) >")) & 10)="","","10 " & $AD$1 & Char(10)) )
 
Upvote 0

Forum statistics

Threads
1,223,882
Messages
6,175,166
Members
452,615
Latest member
bogeys2birdies

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