Share via

How can I remove FALSE from array?

Anonymous
2024-02-15T15:53:20+00:00

I am trying to find a list of names from a workforce planner and while I have the names in an array, I also have 100 FALSEs that I do not want.

Current formula

=ARRAYTOTEXT(IF('[Planner.xlsx]Employees'!$T$12:$T$162="Tech",IF(FILTER('[Planner.xlsx]Employees'!$W$12:$OX$162,'[Planner.xlsx]Employees'!$W$11:$OX$11=B$1)="D",'[Planner.xlsx]Employees'!$V$12:$V$162&" "&'[Planner.xlsx]Employees'!$U$12:$U$162)))

Current result

FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, Desired Name1, Desired Name2, Desired Name3, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, Desired Name4, Desired Name5, Desired Name6, Desired Name7, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE

The reference sheet cannot be reformatted as it is used for may other purposes and referenced on additional files.

I am looking for employee names ['[Planner.xlsx]Employees'!$V$12:$V$162&" "&'[Planner.xlsx]Employees'!$U$12:$U$162]

with a specific job title ['[Planner.xlsx]Employees'!$T$12:$T$162="Tech"]

that have a scheduled status [IF(FILTER('[Planner.xlsx]Employees'!$W$12:$OX$162,'[Planner.xlsx]Employees'!$W$11:$OX$11=B$1)="D"]

for the day in question ['[Planner.xlsx]Employees'!$W$11:$OX$11=B$1].

I have spent many hours trying INDEX, MATCH, LOOKUP, and so one but since there are multiple employees that meet the criteria, the above formula was the first time I got an array with the names plus the unwanted text.

Also, putting "" in the IF statements just leads to this array which doesn't meet the needs of the array

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Desired Name1, Desired Name2, Desired Name3 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Desired Name4, Desired Name5, Desired Name6, Desired Name7 , , , , , , , , , , , , , , , , , , , , , ,

Thanks in advance :)

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2024-02-15T16:00:10+00:00

=TEXTJOIN(", ",,IF(TEXTSPLIT(A1,", ")="FALSE","",TEXTSPLIT(A1,",")))

Or

=let(a,ARRAYTOTEXT(IF('[Planner.xlsx]Employees'!$T$12:$T$162="Tech",IF(FILTER('[Planner.xlsx]Employees'!$W$12:$OX$162,'[Planner.xlsx]Employees'!$W$11:$OX$11=B$1)="D",'[Planner.xlsx]Employees'!$V$12:$V$162&" "&'[Planner.xlsx]Employees'!$U$12:$U$162))),TEXTJOIN(", ",,IF(TEXTSPLIT(a,", ")="FALSE","",TEXTSPLIT(a,","))))

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2024-02-15T15:56:15+00:00

    I would also like to add that we are NOT wanting to use macros or VBA as this is a shared document that will be opened and edited my many people so they tend to get corrupted too easily.

    Was this answer helpful?

    0 comments No comments