FILTER IF the criteria is within the set value (figures)

ExcelNewbie2020

Active Member
Joined
Dec 3, 2020
Messages
343
Office Version
  1. 365
Platform
  1. Windows
what would be the formula if i want to filter the names that the numbers is within the first 20 in the list.
In my table the sum of name1-5 is 15 (column P). it is within the range of 20.





hlink.xlsm
OPQRS
1NAME11RESULT
2NAME22NAME1
3NAME33NAME2
4NAME44NAME3
5NAME55NAME4
6NAME66NAME5
7NAME77
8NAME88
9NAME99
Sheet19
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Does this do what you want?

23 04 29.xlsm
OPQRS
1NAME11RESULT
2NAME22NAME1
3NAME33NAME2
4NAME44NAME3
5NAME55NAME4
6NAME66NAME5
7NAME77
8NAME88
9NAME99
First 20
Cell Formulas
RangeFormula
S2:S6S2=INDEX(O1:O9,SEQUENCE(MATCH(20,SCAN(0,P1:P9,LAMBDA(a,b,a+b)))))
Dynamic array formulas.
 
Upvote 0
Does this do what you want?

23 04 29.xlsm
OPQRS
1NAME11RESULT
2NAME22NAME1
3NAME33NAME2
4NAME44NAME3
5NAME55NAME4
6NAME66NAME5
7NAME77
8NAME88
9NAME99
First 20
Cell Formulas
RangeFormula
S2:S6S2=INDEX(O1:O9,SEQUENCE(MATCH(20,SCAN(0,P1:P9,LAMBDA(a,b,a+b)))))
Dynamic array formulas.
thanks, it does work.. but i am hoping it would be simple as filtering certain values... what if the numbers 1-9 (column P) is not in ascending order?..
 
Upvote 0
Hi, see the linked file (with an auxiliary column) for a possible solution...

Wrong cells visible on Google Drive, because Google Drive does not know the FILTER function. The formula works correctly with your Office 365.

The formula used in the table...
Q1: =SUM(P$1:P1) (Range: Q1:Q9)
S2: =FILTER(O1:O9,Q1:Q9<=20) (Range: S2:S6)

Filer.xlsx

Filer.png
 
Upvote 1
but i am hoping it would be simple as filtering certain values... what if the numbers 1-9 (column P) is not in ascending order?..
Care to give another small set of sample data and the expected results with XL2BB and explain again in relation to that sample to help clarify exactly what you mean/want?
 
Upvote 0
Care to give another small set of sample data and the expected results with XL2BB and explain again in relation to that sample to help clarify exactly what you mean/want?
thank you sir, please see mini sheet, same raw data and expected result except that the raw data is not sorted.. the idea is if possible is to sort column P (ascending) first then filter column O if the sum total is less than 20 (column P) combine in a single formula



hlink.xlsm
OPQRS
1NAME99RESULT
2NAME66NAME1
3NAME11NAME2
4NAME44NAME3
5NAME55NAME4
6NAME33NAME5
7NAME77
8NAME88
9NAME22
Sheet19
 
Upvote 0
Thanks for the additional sample data and results. Give this version a try.

23 04 29.xlsm
OPQRS
1NAME99RESULT
2NAME66NAME1
3NAME11NAME2
4NAME44NAME3
5NAME55NAME4
6NAME33NAME5
7NAME77
8NAME88
9NAME22
First 20 (2)
Cell Formulas
RangeFormula
S2:S6S2=LET(sl,SORT(O1:P9,2),INDEX(sl,SEQUENCE(MATCH(20,SCAN(0,INDEX(sl,0,2),LAMBDA(a,b,a+b)))),1))
Dynamic array formulas.
 
Upvote 1
Solution
Thanks for the additional sample data and results. Give this version a try.

23 04 29.xlsm
OPQRS
1NAME99RESULT
2NAME66NAME1
3NAME11NAME2
4NAME44NAME3
5NAME55NAME4
6NAME33NAME5
7NAME77
8NAME88
9NAME22
First 20 (2)
Cell Formulas
RangeFormula
S2:S6S2=LET(sl,SORT(O1:P9,2),INDEX(sl,SEQUENCE(MATCH(20,SCAN(0,INDEX(sl,0,2),LAMBDA(a,b,a+b)))),1))
Dynamic array formulas.
and it worked like a charm.. thank you
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,619
Latest member
Shiv1198

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