Please can you help advise whether I'd need to use either VBA or lookup to produce an Excel table which details each employee's department, name, and their available dates?
I have an Excel spreadsheet which lists each employee's department, full name, scheduled tasks and all available dates in 2025.
I need my table to detail each employee's: department, name and available dates (i.e. employee department, employee full name, are available on 12/03/2025 and 14/03/2025)?
An example of what the data looks like:
I'd like the result table to look like this:
Thanks so much.
Please can you help advise whether I'd need to use either VBA or lookup to produce an Excel table which details each employee's department, name, and their available dates?
I have an Excel spreadsheet which lists each employee's department, full name, scheduled tasks and all available dates in 2025.
I need my table to detail each employee's: department, name and available dates (i.e. employee department, employee full name, are available on 12/03/2025 and 14/03/2025)?
An example of what the data looks like:
I'd like the result table to look like this:
Thanks so much.
Share edited Mar 4 at 15:00 Robert Mearns 12k3 gold badges40 silver badges42 bronze badges asked Mar 4 at 12:13 JamesJames 1 5 |1 Answer
Reset to default 1=LET(d,A1:G18,
L,LAMBDA(x,TOCOL(IFS(DROP(d,1,1)="",x),2)),
GROUPBY(L(DROP(TAKE(d,1),,1)),
TEXT(L(DROP(TAKE(d,,1),1)),"dd/mm/yyyy"),
ARRAYTOTEXT,,0))
d
is you data including headers.
L
is a function to flatten input array x
in case of empty values in your data excluding headers.
GROUPBY is used on the flattened names and it's flattened dates converted to text. ARRAYTOTEXT combines them per name.
Bonus: you can change ""
to for example "Task3"
to return the names and dates of people working on a task
FILTER
function can be a way. – Black cat Commented Mar 4 at 12:25=FILTER(Sheet1!A2:F11, Sheet1!B2:B11="James")
which would filter out all rows fromA
toF
that containJames
in columnB
of sheetSheet1
(that is, if you have MS365). – VBasic2008 Commented Mar 4 at 13:34