Syntax problems - What syntax to use with XLOOKUP, FILTER and TEXTJOIN nested functions...

Voodoowho

New Member
Joined
Dec 15, 2021
Messages
9
Office Version
  1. 365
Platform
  1. Windows
  2. Web
I have 2 worksheets in the same workbook, STAFF and Objectives.
Each tab contains a table...
'STAFF' holds tblStaff and 'Objectives' holds tblObjectives.

The tblOjectives has several headers with each staff member's names (col G:R), under which are cells containing the date that a certain objective name (col B) was added, or blank if not.

On the STAFF tab, tblStaff holds records of the same staff member names (col A) and a column (J) labeled 'Objectives' where I want to return the objective names, separated by a comma, from the tblObjectives for each staff name.

I'm trying to use XLOOKUP, FILTER and TEXTJOINE functions, but I can't get it to work. Is it even possible to do this?
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
The problem is that I work for a governmental agency and the restrictions are heavy for downloading and installing add-ins. I can't even use Macros that are not already approved and pre-installed. What would be the best way to show what I'm trying to do given the restrictions?
 
Upvote 0
Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
The problem is that I work for a governmental agency and the restrictions are heavy for downloading and installing add-ins. I can't even use Macros that are not already approved and pre-installed. What would be the best way to show what I'm trying to do given the restrictions?
Never mind. I was able to install the add-in with no issues. :) I'll see what I can do with it. Thanks!
 
Upvote 0
Staff Work Reviewed.xlsx
ABCDEFGHIJ
1Staff NameTitleCreditable Serivice DateSeniority DateContinuous Service DateTime in State ServiceDate Hired in TitleTime in Current PositionNext Evaluation DueObjectives
2TracieESPR9/1/20224/18/20164/18/20166 Years 6 Months 16 Days3/1/20184 Years 8 Months 2 Days1/1/2023
3JulieESPR9/1/20226/1/20156/1/20157 Years 5 Months 2 Days9/1/20202 Years 2 Months 2 Days9/1/2023
4JoshESPR10/1/202110/16/201710/16/20175 Years 0 Months 18 Days10/1/20175 Years 1 Months 2 Days10/1/2023
5AngelaESPR5/1/20225/8/20175/4/20155 Years 5 Months 26 Days2/16/20211 Years 8 Months 18 Days2/1/2023
STAFF
Cell Formulas
RangeFormula
F2:F5F2=DATEDIF([@[Seniority Date]],TODAY(),"y")&" Years "&DATEDIF([@[Seniority Date]],TODAY(),"ym")&" Months "&DATEDIF([@[Seniority Date]],TODAY(),"md")&" Days"
H2:H5H2=DATEDIF([@[Date Hired in Title]],TODAY(),"y")&" Years "&DATEDIF([@[Date Hired in Title]],TODAY(),"ym")&" Months "&DATEDIF([@[Date Hired in Title]],TODAY(),"md")&" Days"
Cells with Conditional Formatting
CellConditionCell FormatStop If True
I2:I14Dates Occurringnext monthtextNO


There are several more names on the above table.

And on a different worksheet tab in the same workbook...

Staff Work Reviewed.xlsx
ABCDEFGHIJKLMNOPQRS
1NumberCategoryMetExceededMethodologyLanguageAngelaCherylDavidMitchellJoAnnaJulieJoshTracieWhitneyMichelleBrianMarcusNotes:
21Adjudication BTQ75% = 95+ Score76% - 100% = 95+ ScoreReviewof non-separation cases have a BTQ score of 95 or greater.2/1/20229/1/202210/1/20229/1/202210/1/20211/1/20221/1/20221/1/20221/1/2222
32Adjudication Timeliness - Scheduled issues80%81% - 100%ADJ007 / ADJ003of determinations completed within 21 days of the Issue Detection Date. 9/1/2022
43Assignment Accuracy90% - 95% = Correct96% - 100% CorrectReviewof assignments completed are correct. 10/1/2022
54Claim Entry - Accuracy92% - 95% of sample = 100% correct96% - 100% of sample = 100% correctReviewReviews should consider: wage information (mondet vs. Pseudo), separation details (employment infor for all employers on mondet), correct LEU, correct BCE and correct issues added.9/1/2022
65Claims - (Entry Level 2)??????ReviewTo gain understanding of basic claims processing including, but not limited to claim types, program types, affidavits, dependency allowance, benefit charging and issue detection. Attend and successfully complete basic claims training.
76Claims - (Entry Level)??????ReviewLearn and understand how to navigate in the Illinois Benefits Information System (IBIS), Illinois Job Link (IJL) and Gentax.
87CommunicationNo valid complaints??????Effectively comunicates with colleagues, supervisor, partners and customers in a respectful manner.10/1/20221/1/2022
98Data Entry?????????All data entry is completed accurately and timely. Including, but not limited to, updating demographics, entering services, IJL Self Tracker, SharePoint entries, weekly/monthly reports, etc.3/1/2022
109Document Processing90% - 95% = Correct96% - 100% CorrectReviewof documents processed and reviewd are correctly assigned to the correct claimant, indexed and attached to the issue, and the appropriate work-flow assigned.10/1/2022
1110Employment Service - (Entry Level)??????ObservationUnderstand proper documentation within IJL for all services provided to Job Seekers to indicate that appropriate activities were performed to warrant credit for same services. 9/1/2022To be revised for Julie on 12/1/22.
1211Employment Services - Workshops?????????Virtual Workshops: Facilitate workshops for clients. This includes the preparation and folow-up work for workshops hosted or co-hosted by IDES Effingham office. Make sure all relevant information is submitted correctly and in a timely manner to Sharepoint.10/1/2022
1312ES Programs?????????Understand IDES programs related to Employment Services, including, but not limited to, Work Opportunity Tax Credit (WOTC), Fidelity Bonding and Re-Employment Services (RES) and Re-Employment Services and Eligibility Assessment (RESEA).9/1/202210/1/20223/1/2022
1413ES Workshops - (Entry Level)Attend/Participate in 1Attend/Participate in 2 or more per month (24+)Webex RecordsWork with partners and ES Staff to help organize and/or facilitate one job seeker workshop per month.To be revised for Julie on 12/1/22.
Objectives


There are more Objectives as records on this table as well that are not included.

I want to return a comma separated list of Objectives (listed under Category in tblObjectives) into the 'Objectives' column in tblStaff where there is a date under the same named columns in tblObjectives.
 
Upvote 0
Thanks for that, how about
Excel Formula:
=LET(f,FILTER(tblObjectives,(tblObjectives[#Headers]=[@[Staff Name]])+(tblObjectives[#Headers]=tblObjectives[[#Headers],[Category]])),TEXTJOIN(", ",,FILTER(INDEX(f,,1),INDEX(f,,2)<>"")))
 
Upvote 0
Solution
Thanks for that, how about
Excel Formula:
=LET(f,FILTER(tblObjectives,(tblObjectives[#Headers]=[@[Staff Name]])+(tblObjectives[#Headers]=tblObjectives[[#Headers],[Category]])),TEXTJOIN(", ",,FILTER(INDEX(f,,1),INDEX(f,,2)<>"")))
This seems to work, but only for the first 4 records in the table. The rest, after the first 4 are giving #REF errors. It may be because not every 'Category' has a date for at least one rep. If there isn't a way around it, I can just put unused 'Category' items onto another table or delete them. But it would be best to leave them on there and just somehow handle the blanks.
 
Last edited:
Upvote 0
Works for me no matter how many rows you have
Cell Formulas
RangeFormula
F2:F10F2=DATEDIF([@[Seniority Date]],TODAY(),"y")&" Years "&DATEDIF([@[Seniority Date]],TODAY(),"ym")&" Months "&DATEDIF([@[Seniority Date]],TODAY(),"md")&" Days"
H2:H10H2=DATEDIF([@[Date Hired in Title]],TODAY(),"y")&" Years "&DATEDIF([@[Date Hired in Title]],TODAY(),"ym")&" Months "&DATEDIF([@[Date Hired in Title]],TODAY(),"md")&" Days"
J2:J10J2=LET(f,FILTER(tblObjectives,(tblObjectives[#Headers]=[@[Staff Name]])+(tblObjectives[#Headers]=tblObjectives[[#Headers],[Category]])),TEXTJOIN(", ",,FILTER(INDEX(f,,1),INDEX(f,,2)<>"")))
 
Upvote 0
Works for me no matter how many rows you have
Cell Formulas
RangeFormula
F2:F10F2=DATEDIF([@[Seniority Date]],TODAY(),"y")&" Years "&DATEDIF([@[Seniority Date]],TODAY(),"ym")&" Months "&DATEDIF([@[Seniority Date]],TODAY(),"md")&" Days"
H2:H10H2=DATEDIF([@[Date Hired in Title]],TODAY(),"y")&" Years "&DATEDIF([@[Date Hired in Title]],TODAY(),"ym")&" Months "&DATEDIF([@[Date Hired in Title]],TODAY(),"md")&" Days"
J2:J10J2=LET(f,FILTER(tblObjectives,(tblObjectives[#Headers]=[@[Staff Name]])+(tblObjectives[#Headers]=tblObjectives[[#Headers],[Category]])),TEXTJOIN(", ",,FILTER(INDEX(f,,1),INDEX(f,,2)<>"")))
I figured it out. I had removed the last names for the records to protect the innocent. Lol! Thank you so much! Beautiful solution!!!
How do I go back and change the names back to first and last name? If I just add the last names back to the tblObjectives and put "" around the outside of the [ ]s on the names, will that fix it?

Again, never mind. I'm pretty thick on Friday. Lol. I think I have it now. Just needed to fix the names and then apply the formula. I'll let you know how it goes. Thanks again!
 
Last edited:
Upvote 0
Do both Staff names & the table headers include the full name?
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,203
Members
452,617
Latest member
Narendra Babu D

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