Filter Function: Include using Spill Range

ChiefLapuLapu

New Member
Joined
Apr 7, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hello,

In cell N2 I have the following formula = TRANSPOSE(UNIQUE(FILTER(Calendar[Week-Year],(Calendar[Date]>=L2)*(Calendar[Date]<=M2))))

1695969312547.png


This works, but I would like to use a spill range for arguments L2 and M2. Both columns L & M are separate spill range formulas.

I tried the following formula, but receive an #N/A error in cell N2.

=TRANSPOSE(UNIQUE(FILTER(Calendar[Week-Year],(Calendar[Date]>=L2#)*(Calendar[Date]<=M2#)))).

I imagine I will have to utilize LAMBDA, but having trouble figuring that part out.

Thanks in advance.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hello,

In cell N2 I have the following formula = TRANSPOSE(UNIQUE(FILTER(Calendar[Week-Year],(Calendar[Date]>=L2)*(Calendar[Date]<=M2))))

View attachment 99500

This works, but I would like to use a spill range for arguments L2 and M2. Both columns L & M are separate spill range formulas.

I tried the following formula, but receive an #N/A error in cell N2.

=TRANSPOSE(UNIQUE(FILTER(Calendar[Week-Year],(Calendar[Date]>=L2#)*(Calendar[Date]<=M2#)))).

I imagine I will have to utilize LAMBDA, but having trouble figuring that part out.

Thanks in advance.
Can you please send us the source data and this analysis using XL2BB?

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
How about
Excel Formula:
=DROP(REDUCE("",SEQUENCE(ROWS(L2#)),LAMBDA(x,y,VSTACK(x,TOROW(UNIQUE(FILTER(Calendar[Week-Year],(Calendar[Date]>=INDEX(L2#,y,1))*(Calendar[Date]<=INDEX(M2#,y,1)))))))),1)
 
Upvote 1
Solution
How about
Excel Formula:
=DROP(REDUCE("",SEQUENCE(ROWS(L2#)),LAMBDA(x,y,VSTACK(x,TOROW(UNIQUE(FILTER(Calendar[Week-Year],(Calendar[Date]>=INDEX(L2#,y,1))*(Calendar[Date]<=INDEX(M2#,y,1)))))))),1)

Works like a charm. You are brilliant sir, thank you.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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