TEXTJOIN over multiple rows and 3 columns with specific date range

Allen_Mead

New Member
Joined
May 31, 2019
Messages
36
Office Version
  1. 365
Platform
  1. Windows
I want to be able to use the textjoin function to pull data from our CPD table into a summary for the working week, driven by the date on a given Monday (this will be in a separate cell)

The CPD table will be constantly updated and will include old data (as need to keep a record of all undertaken) and future information.

I would like the data to display as a weekday

Really stuck on this, screen shot attached (sorry i cannot install the XL2BB add on as I'm on a work computer) Many thanks for any help!
 

Attachments

  • Screenshot 2024-01-05 120133.png
    Screenshot 2024-01-05 120133.png
    26.1 KB · Views: 41

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Had a thought, is it possible for the formula to sort the data chronologically? Asking as if people enter information in the CPD table in any order (which is fine) it will show the results in the cell chronologically correct?

At the moment, as an example, I have it that next week, there are 3 items on, Monday, Tuesday and Thursday. The formula currently picks everything up but, in the order that it's been entered in the table so we currently have events in this order; Tuesday, Thursday, Monday. Trying to ensure the data is 'forced' to show correctly even if people cannot be bothered to enter it correctly.

Thanks!
 
Upvote 0
I assume that this would be using the SORT() or SORTBY() function but don't know where I should insert this in the formula
 
Upvote 0
how about?:

Book1
ABCDEF
108/01/2024Current date
2
3
4TitleWhere?Date
5Protecting High-rise Residential Buildings from Firewebinar12/01/2024
6Built Environment Monthly Webinar - The Golden Thread of informationin person08/01/2024
7Bridging the gap between fire and emergency lighting systemswebinar09/01/2024
8Bureau Veritas - Building Safety Bill Seminarwebinar10/01/2024
9Class 0 Conumdrumin person15/01/2024
10The Key Essentials of Water Mist Fire Protectionin person16/01/2024
11Monday: (in person) Built Environment Monthly Webinar - The Golden Thread of information Tuesday: (webinar) Bridging the gap between fire and emergency lighting systems Wednesday: (webinar) Bureau Veritas - Building Safety Bill Seminar Friday: (webinar) Protecting High-rise Residential Buildings from Fire
Sheet1
Cell Formulas
RangeFormula
F11F11=LET(d,$A$1, startOfWeek,WORKDAY.INTL(d+1,-1,"1111110"), endOfWeek,startOfWeek+6, events,FILTER(SORTBY(Tabla1,Tabla1[Date]),(Tabla1[Date]>=startOfWeek)*(Tabla1[Date]<=endOfWeek)), TEXTJOIN(CHAR(10),,BYROW(events,LAMBDA(x,TEXT(CHOOSECOLS(x,3),"dddd")&": ("&CHOOSECOLS(x,2)&") "&CHOOSECOLS(x,1)))) )
 
Upvote 0
Or if you don't have you data as a table:

Book1
ABCDEF
108/01/2024Current date
2
3
4TitleWhere?Date
5Protecting High-rise Residential Buildings from Firewebinar12/01/2024
6Built Environment Monthly Webinar - The Golden Thread of informationin person08/01/2024
7Bridging the gap between fire and emergency lighting systemswebinar09/01/2024
8Bureau Veritas - Building Safety Bill Seminarwebinar10/01/2024
9Class 0 Conumdrumin person15/01/2024
10The Key Essentials of Water Mist Fire Protectionin person16/01/2024
11Monday: (in person) Built Environment Monthly Webinar - The Golden Thread of information Tuesday: (webinar) Bridging the gap between fire and emergency lighting systems Wednesday: (webinar) Bureau Veritas - Building Safety Bill Seminar Friday: (webinar) Protecting High-rise Residential Buildings from Fire
Sheet1
Cell Formulas
RangeFormula
F11F11=LET(d,$A$1, startOfWeek,WORKDAY.INTL(d+1,-1,"1111110"), endOfWeek,startOfWeek+6, events,FILTER(SORTBY(Sheet1!$A$5:$C$10,Sheet1!$C$5:$C$10),(Sheet1!$C$5:$C$10>=startOfWeek)*(Sheet1!$C$5:$C$10<=endOfWeek)), TEXTJOIN(CHAR(10),,BYROW(events,LAMBDA(x,TEXT(CHOOSECOLS(x,3),"dddd")&": ("&CHOOSECOLS(x,2)&") "&CHOOSECOLS(x,1)))) )
 
Upvote 0
Or if you don't have you data as a table:

Book1
ABCDEF
108/01/2024Current date
2
3
4TitleWhere?Date
5Protecting High-rise Residential Buildings from Firewebinar12/01/2024
6Built Environment Monthly Webinar - The Golden Thread of informationin person08/01/2024
7Bridging the gap between fire and emergency lighting systemswebinar09/01/2024
8Bureau Veritas - Building Safety Bill Seminarwebinar10/01/2024
9Class 0 Conumdrumin person15/01/2024
10The Key Essentials of Water Mist Fire Protectionin person16/01/2024
11Monday: (in person) Built Environment Monthly Webinar - The Golden Thread of information Tuesday: (webinar) Bridging the gap between fire and emergency lighting systems Wednesday: (webinar) Bureau Veritas - Building Safety Bill Seminar Friday: (webinar) Protecting High-rise Residential Buildings from Fire
Sheet1
Cell Formulas
RangeFormula
F11F11=LET(d,$A$1, startOfWeek,WORKDAY.INTL(d+1,-1,"1111110"), endOfWeek,startOfWeek+6, events,FILTER(SORTBY(Sheet1!$A$5:$C$10,Sheet1!$C$5:$C$10),(Sheet1!$C$5:$C$10>=startOfWeek)*(Sheet1!$C$5:$C$10<=endOfWeek)), TEXTJOIN(CHAR(10),,BYROW(events,LAMBDA(x,TEXT(CHOOSECOLS(x,3),"dddd")&": ("&CHOOSECOLS(x,2)&") "&CHOOSECOLS(x,1)))) )
That works perfectly! Thank you.
 
Upvote 0
Another option
Excel Formula:
=TEXTJOIN(CHAR(10),,BYROW(SORT(A5:C10,3),LAMBDA(br,IF(AND(INDEX(br,,3)-A1>=0,INDEX(br,,3)-A1<7),TEXTJOIN({": (",") "},,TEXT(INDEX(br,,3),"dddd"),CHOOSECOLS(br,2,1)),""))))
 
Upvote 0
Another option
Excel Formula:
=TEXTJOIN(CHAR(10),,BYROW(SORT(A5:C10,3),LAMBDA(br,IF(AND(INDEX(br,,3)-A1>=0,INDEX(br,,3)-A1<7),TEXTJOIN({": (",") "},,TEXT(INDEX(br,,3),"dddd"),CHOOSECOLS(br,2,1)),""))))
Works perfectly! Thank you!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,021
Latest member
Justyna P

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