TheColonist
New Member
- Joined
- Jun 23, 2023
- Messages
- 11
- Office Version
- 365
- Platform
- Windows
I work for a school for the blind and visually impaired. Every 2 weeks we get a new schedule. The first figure is an example of the schedule table. Most of the instructors are blind. This is cumbersome to navigate with a screen reader.
I created another worksheet for the instructors, Figure 2. I use the following formula to list the students and the class they are attending.
The formula below returns the student's first name from the "First" column and the last three letters of the Class in P1 if the first 4 characters in P1 = the first 4 characters of the instructor's name, which is a column header, in Figure 2. It works great, but some instructors may only have 2 or 3 letters in their first name, such as Al, or Don. Right now, I add characters to make the formula work and distinguish instructors that may have the same first 4 characters.
=TEXTJOIN(", ",1,FILTER(AT_VISP[First]&TEXTAFTER(AT_VISP[P1],"-"),
LEFT(AT_VISP[P1],4)=LEFT(Table36[[#Headers],[Randy]],4),""))
I tried the following formula, but I get a #NA error. Obviously, TEXTAFTER works in the FILTER function, but I can't get TEXTBEFORE to work.
=TEXTJOIN(", ",1,FILTER(AT_VISP[First]&TEXTAFTER(AT_VISP[P1],"-"),
TEXTBEFORE(AT_VISP[P1],"-")=Table36[[#Headers],[Randy]],""))
Any ideas why TEXTBEFORE isn’t working?
Fig. 1
Fig. 2
I created another worksheet for the instructors, Figure 2. I use the following formula to list the students and the class they are attending.
The formula below returns the student's first name from the "First" column and the last three letters of the Class in P1 if the first 4 characters in P1 = the first 4 characters of the instructor's name, which is a column header, in Figure 2. It works great, but some instructors may only have 2 or 3 letters in their first name, such as Al, or Don. Right now, I add characters to make the formula work and distinguish instructors that may have the same first 4 characters.
=TEXTJOIN(", ",1,FILTER(AT_VISP[First]&TEXTAFTER(AT_VISP[P1],"-"),
LEFT(AT_VISP[P1],4)=LEFT(Table36[[#Headers],[Randy]],4),""))
I tried the following formula, but I get a #NA error. Obviously, TEXTAFTER works in the FILTER function, but I can't get TEXTBEFORE to work.
=TEXTJOIN(", ",1,FILTER(AT_VISP[First]&TEXTAFTER(AT_VISP[P1],"-"),
TEXTBEFORE(AT_VISP[P1],"-")=Table36[[#Headers],[Randy]],""))
Any ideas why TEXTBEFORE isn’t working?
Fig. 1
Fig. 2