TEXTJOIN over multiple rows and 3 columns with specific date range

Allen_Mead

New Member
Joined
May 31, 2019
Messages
34
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

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Is this what you need?

Book1
ABCD
1Protecting High-rise Residential Buildings from Firewebinar05/01/2024Friday:(webinar)Protecting High-rise Residential Buildings from Fire
2Built Environment Monthly Webinar - The Golden Thread cIn person08/01/2024Monday:(In person)Built Environment Monthly Webinar - The Golden Thread c
3Bridging thegap between fire and emergency lighting systtwebinar09/01/2024Tuesday:(webinar)Bridging thegap between fire and emergency lighting systt
4Bureau Veritas - BuildingSafety Bill Seminarwebinar10/01/2024Wednesday:(webinar)Bureau Veritas - BuildingSafety Bill Seminar
5Class 0 ConumdrumIn person15/01/2024Monday:(In person)Class 0 Conumdrum
6The Key Essentials of Water Mist Fire ProtectionIn person16/01/2024Tuesday:(In person)The Key Essentials of Water Mist Fire Protection
Sheet1
Cell Formulas
RangeFormula
D1:D6D1=CONCATENATE(TEXT(C1,"dddd"),":","(",B1,")",A1)
 
Upvote 0
How about one of these?:
Im assuming that your data is formatted as a table.
From the formula in F5 you will get one row for each entry. From the formula in F11 you will get all concatenated with a linebreak character:

TaskPerWeek.xlsx
ABCDEF
1Current date08/01/2024
2
3
4TitleWhere?Date
5Protecting High-rise…webinar05/01/2024Monday: (in person) Built Environment…
6Built Environment…in person08/01/2024Tuesday: (webinar) Bridging the gap…
7Bridging the gap…webinar09/01/2024Wednesday: (webinar) Bureau Veritas - …
8Bureau Veritas - …webinar10/01/2024
9Class 0 Conundrumin person15/01/2024
10The Key Essentials…in person16/01/2024
11Monday: (in person) Built Environment… Tuesday: (webinar) Bridging the gap… Wednesday: (webinar) Bureau Veritas - …
Hoja1
Cell Formulas
RangeFormula
F5:F7F5=LET(d,$B$1, startOfWeek,WORKDAY.INTL(d+1,-1,"1111110"), endOfWeek,startOfWeek+6, events,FILTER(Tabla1,(Tabla1[Date]>=startOfWeek)*(Tabla1[Date]<=endOfWeek)), BYROW(events,LAMBDA(x,TEXT(CHOOSECOLS(x,3),"dddd")&": ("&CHOOSECOLS(x,2)&") "&CHOOSECOLS(x,1))) )
F11F11=LET(d,$B$1, startOfWeek,WORKDAY.INTL(d+1,-1,"1111110"), endOfWeek,startOfWeek+6, events,FILTER(Tabla1,(Tabla1[Date]>=startOfWeek)*(Tabla1[Date]<=endOfWeek)), TEXTJOIN(CHAR(10),,BYROW(events,LAMBDA(x,TEXT(CHOOSECOLS(x,3),"dddd")&": ("&CHOOSECOLS(x,2)&") "&CHOOSECOLS(x,1)))) )
Dynamic array formulas.
 
Upvote 0
Is this what you need?

Book1
ABCD
1Protecting High-rise Residential Buildings from Firewebinar05/01/2024Friday:(webinar)Protecting High-rise Residential Buildings from Fire
2Built Environment Monthly Webinar - The Golden Thread cIn person08/01/2024Monday:(In person)Built Environment Monthly Webinar - The Golden Thread c
3Bridging thegap between fire and emergency lighting systtwebinar09/01/2024Tuesday:(webinar)Bridging thegap between fire and emergency lighting systt
4Bureau Veritas - BuildingSafety Bill Seminarwebinar10/01/2024Wednesday:(webinar)Bureau Veritas - BuildingSafety Bill Seminar
5Class 0 ConumdrumIn person15/01/2024Monday:(In person)Class 0 Conumdrum
6The Key Essentials of Water Mist Fire ProtectionIn person16/01/2024Tuesday:(In person)The Key Essentials of Water Mist Fire Protection
Sheet1
Cell Formulas
RangeFormula
D1:D6D1=CONCATENATE(TEXT(C1,"dddd"),":","(",B1,")",A1)
Nearly.

All the data would need to be in a single cell, hence the TEXTJOIN function and would need to only include data from a specific date range, ie. from 08/01/2024 + 5 days
 
Upvote 0
Another option
Fluff.xlsm
ABCD
108/01/2024
2
3
4Monday: (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
5Protecting High-rise Residential Buildings from Firewebinar05/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
Sheet5
Cell Formulas
RangeFormula
D4D4=TEXTJOIN(CHAR(10),,BYROW(A5:C10,LAMBDA(br,IF(WEEKNUM(INDEX(br,,3))=WEEKNUM(A1),TEXTJOIN({": (",") "},,TEXT(INDEX(br,,3),"dddd"),CHOOSECOLS(br,2,1)),""))))
 
Upvote 1
Solution
Another option
Fluff.xlsm
ABCD
108/01/2024
2
3
4Monday: (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
5Protecting High-rise Residential Buildings from Firewebinar05/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
Sheet5
Cell Formulas
RangeFormula
D4D4=TEXTJOIN(CHAR(10),,BYROW(A5:C10,LAMBDA(br,IF(WEEKNUM(INDEX(br,,3))=WEEKNUM(A1),TEXTJOIN({": (",") "},,TEXT(INDEX(br,,3),"dddd"),CHOOSECOLS(br,2,1)),""))))
Hit the nail on the head! thank you so much
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
On a week where the year end/begins the formula in post 6 wont work properly. Because the week number for the first days will be 53 (or 54) and the rest will be 1.

29/12/2024 Sun53
30/12/2024 Mon53
31/12/2024 Tue53
01/01/2025 Wed1
02/01/2025 Thu1
03/01/2025 Fri1
04/01/2025 Sat1


I tried to take that into account in the formulas in post 3.
 
Upvote 0
Good point, another option to correct that
Excel Formula:
=TEXTJOIN(CHAR(10),,BYROW(A5:C10,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 1
Good point, another option to correct that
Excel Formula:
=TEXTJOIN(CHAR(10),,BYROW(A5:C10,LAMBDA(br,IF(AND(INDEX(br,,3)-A1>=0,INDEX(br,,3)-A1<7),TEXTJOIN({": (",") "},,TEXT(INDEX(br,,3),"dddd"),CHOOSECOLS(br,2,1)),""))))
Perfecto! thank you.
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

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