SOLVED

Help with filtering out data

Copper Contributor

tjd85_0-1726908386303.png

Hi, above is a works holiday sheet. I want to be able to find out what weeks a specific person appears in. I.e. 'C.Hipkiss' has w/c 'a,b,c & d' off. I've used a VLOOKUP to what find who's off on a specific date but i can't figure out the above problem. Any ideas?

6 Replies

@tjd85 

First and foremost you need to be using Excel 365.

image.png

FILTER makes it easy to return multiple  values that meet a criterion and the BYROW checks where the selected person appears within the table

= FILTER(weekCommencing, BYROW(holiday = person, OR))

Thanks for the reply.

tjd85_0-1726930428534.png

It just returns name! 😕

!

@PeterBartholomew1 

best response confirmed by tjd85 (Copper Contributor)
Solution

@tjd85 

@PeterBartholomew1 's formula only works in Excel for Microsoft 365 Insiders.

In the attached workbook you'll find an 'old-fashioned' formula that should work in all versions of Excel. It uses a helper column.

Thanks you very much

@HansVogelaar 

Using a formula that requires 365 insider was an error on my behalf.  I should have used the Lambda function rather than an eta-reduced version

= FILTER(weekCommencing, BYROW(holiday = person, LAMBDA(x, OR(x))))

 Well done on your formula, BTW.  If you had kicked me, I would have sent you a copy of my workbook rather than having you generate something from scratch.  I had got a reasonable start by using Windows/Shift/S to bring the data in as a picture. 

 

By the time I had worked your solution through to get

= IFERROR(INDEX(weekCommencing, SMALL(IF(helper, SEQUENCE(12), ""), @k)), "")

I finally understood it!  By now, I have completely lost the knack of reading 'old-style' formulas 😓.

Thanks for all the replies and answers. All very helpful. I actually think I'm running 365 on my laptop but the spreadsheet I'm working on is from work which is based on an older version of excel which caused some issues.
1 best response

Accepted Solutions
best response confirmed by tjd85 (Copper Contributor)
Solution

@tjd85 

@PeterBartholomew1 's formula only works in Excel for Microsoft 365 Insiders.

In the attached workbook you'll find an 'old-fashioned' formula that should work in all versions of Excel. It uses a helper column.

View solution in original post