Forum Discussion
Clare1487
Jun 26, 2023Copper Contributor
Returning multiple column headers based on duplicated dates within a row
Hi I have read many similar questions & answers, but none of the replies seem to work with my data. I have a spreadsheet with dates in varying order from left to right and some blank cells within ea...
Clare1487
Jun 27, 2023Copper Contributor
Thank you so much for your help. Unfortunately this is not giving me the output I needed. Perhaps an error on my part inputting the formula(?) I'll upload a sample file in case that explains it. I have tried replacing blank cells with X but that hasn't made any difference.
I have typed
=LET(results, IF(T2 = D2:FY2, header, ""),BYROW(results, LAMBDA(row, TEXTJOIN(",",1,row))))
It just gives me the error #NAME?
I have typed
=LET(results, IF(T2 = D2:FY2, header, ""),BYROW(results, LAMBDA(row, TEXTJOIN(",",1,row))))
It just gives me the error #NAME?
Patrick2788
Jun 27, 2023Silver Contributor
It might have issue with 'header' which is a defined name in my sample. It refers to the first row which contains the column headings.
- Clare1487Jun 28, 2023Copper ContributorThank you. Yes, that's working for me now. Fantastic, very much appreciated. Could the same formula be modified to look for the column headers corresponding to the first date after the target?
- Patrick2788Jun 28, 2023Silver ContributorIt's do-able. Is the first date after the target = target+1 day or another date?
- Clare1487Jun 28, 2023Copper ContributorGood news. No, there isn't a set number of days after target it is random...........could be 5 days could be 30! And the columns don't run in chronological order either which makes it doubly fun to try to look at such a large amount of data without a formula to assist