Additional criteria in FILTER formula

ozil

New Member
Joined
Mar 25, 2025
Messages
28
Office Version
  1. 365
Platform
  1. Windows
Hi
I’m using filter function and its working but now I’m thinking how to get returned column 2 as per formula for values >800?

So here is formula. And the last two 6 is returned column and -1 sorted ascending but i would see only over 800

=SORT(CHOOSECOLS(FILTER(DATA[[Region]:[WTD 3 Average]],DATA[Region]=Sheet1!N7),1,2,3,4,5,19),6,-1)
 
This?? Adding a second filter where column 2 is greater than 800.
Excel Formula:
=SORT(CHOOSECOLS(FILTER(DATA[[Region]:[WTD 3 Average]],(DATA[Region]=Sheet1!N7)*(DATA[whatever column 2 is called]>800)),1,2,3,4,5,19),6,-1)
 
Upvote 1
Thats help ! Thank you.
So how about now if the last returned column I want to have returned values depends on drop down list so would need to look thru columns to give the values
 
Upvote 0
If the last column is data region, somewhere - say cell z1 I would put:
Excel Formula:
=SORT(UNIQUE(DATA[Region]))

then in the data validation in cell -say- y1, select LIST and set it to
Excel Formula:
=Z1#

Then the final formula would be:
Excel Formula:
=SORT(CHOOSECOLS(FILTER(DATA[[Region]:[WTD 3 Average]],(DATA[Region]=Sheet1!N7)*(DATA[Whatever column 2 is called]>800)*(DATA[Region]=Y1)),1,2,3,4,5,19),6,-1)

For filtering - multiplying is AND, and adding is OR. Always put parenthesis around the =<> expressions. And use parenthesis (often confusingly) to construct a complicated set of ANDs and ORs if needed.
 
Upvote 0

Hi please see file uploaded here. Think could be easier for you to understand and work on to help. Thank you
 
Upvote 0
Hi
My work pc wont let me download I think. I will try to work and get it thru xl2bb for you but in meantime see picture to give you idea view
 

Attachments

  • Screenshot (64).png
    Screenshot (64).png
    106 KB · Views: 8
Upvote 0
Any thoughts on the screenshot ? Its all as table. Unfortunately I cant get xl2bb to work :(
 
Upvote 0
It'll never let me download files here. xl2bb could work.
see below, sortation by Region2 as another drop down would be great too.

Book1.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBEBFBGBHBIBJBKBLBMBNBOBPBQBRBSBTBUBVBWBXBYBZCACBCCCDCECFCGCHCICJCKCLCMCNCOCPCQCRCSCTCUCVCWCXCYCZDADBDCDDDEDFDGDHDIDJDKDLDMDNDODPDQDRDSDTDUDVDWDXDYDZEAEBECEDEEEFEGEHEIEJEKELEMENEOEPEQERESETEUEVEWEXEYEZFAFBFCFDFEFFFGFHFIFJFKFLFMFNFOFPFQFRFSFTFUFV
1RegionRegion2HUBEmployee NameRoleContract30-DecOT 30-Dec06-JanOT 06-Jan13-JanOT 13-Jan20-JanOT 20-Jan27-JanOT 27-JanJan Total HoursJan Average HoursJan Total OT HoursJan OT CostColumn703-FebOT 03-Feb10-FebOT 10-Feb17-FebOT 17-Feb24-FebOT 24-FebFeb Total HoursFeb Average HoursFeb Total OT HoursFeb OT CostColumn1603-MarOT 03-Mar10-MarOT 10-Mar17-MarOT 17-Mar24-MarOT 24-MarMar Total HoursMar Average HoursMar Total OT HoursMar OT CostColumn131-MarOT 31-Mar07-AprOT 07-Apr14-AprOT 14-Apr21-AprOT 21-Apr28-AprOT 28-AprApr Total HoursApr Average HoursApr Total OT HoursApr OT CostColumn2WTD 1 TotalWTD 1 AverageColumn805-MayOT 05-May12-MayOT 12-May19-MayOT 19-May26-MayOT 26-MayMay Total HoursMay Average HoursMay Total OT HoursMay OT CostColumn4702-JunOT 02-Jun09-JunOT 09-Jun16-JunOT 16-Jun23-JunOT 23-JunJun Total HoursJun Average HoursJun Total OT HoursJun OT CostColumn5630-JunOT 30-Jun07-JulOT 07-Jul14-JulOT 14-Jul21-JulOT 21-Jul28-JulOT 28-JulJul Total HoursJul Average HoursJul Total OT HoursJul OT CostColumn6604-AugOT 04-Aug11-AugOT 11-Aug18-AugOT 18-Aug25-AugOT 25-AugAug Total HoursAug Average HoursAug Total OT HoursAug OT CostColumn75WTD 2 TotalWTD 2 AverageColumn7801-SepOT 01-Sep08-SepOT 08-Sep15-SepOT 15-Sep22-SepOT 22-SepSep Total HoursSep Average HoursSep Total OT HoursSep OT CostColumn329-SepOT 29-Sep06-OctOT 06-Oct13-OctOT 13-Oct20-OctOT 20-Oct27-OctOT 27-OctOct Total HoursOct Avarege HoursOct Total OT HoursOct OT CostColumn403-NovOT 03-Nov10-NovOT 10-Nov17-NovOT 17-Nov24-NovOT 24-NovNov Total HoursNov Average HoursNov Total OT HoursNov OT CostColumn501-DecOT 01-Dec08-DecOT 08-Dec15-DecOT 15-Dec22-DecOT 22-DecDec Total HoursDec Average HoursDec Total OT HoursDec OT CostColumn6WTD 3 TotalWTD 3 Average
2SouthSouth CentralBBBoooooWRH4040.00042.752.7546.006.0042.002.0046.006.00216.7543.3510.75£174.6944.004.0042.752.7541.501.5039.750168.0042.0014.25£231.5640.500.5040.00041.001.000121.5040.501.50£24.38000000#DIV/0!0.00£0.00506.2542.1900000.00#DIV/0!0.00£0.0000000.00#DIV/0!0.00£0.00000000#DIV/0!0.00£0.0000000.00#DIV/0!0.00£0.000.00#DIV/0!00000.00#DIV/0!0.00£0.00000000#DIV/0!0.00£0.0000000.00#DIV/0!0.00£0.0000000.00#DIV/0!0.00£0.000.00#DIV/0!
3SouthSouth WestAAAggggghWRH4042.002.0044.004.0043.753.7541.251.2542.252.25213.2542.6511.00£178.7542.502.5040.250.2541.501.5045.255.25169.5042.386.50£105.6340.00040.250.2540.0000120.2540.085.50£89.38000000#DIV/0!0.00£0.00503.0041.9200000.00#DIV/0!0.00£0.0000000.00#DIV/0!0.00£0.00000000#DIV/0!0.00£0.0000000.00#DIV/0!0.00£0.000.00#DIV/0!00000.00#DIV/0!0.00£0.00000000#DIV/0!0.00£0.0000000.00#DIV/0!0.00£0.0000000.00#DIV/0!0.00£0.000.00#DIV/0!
4SouthSouth EastCCCfshjLCV4848.00042.00039.50037.50041.500208.5041.700.00£0.0042.50042.50042.50042.500170.0042.500.00£0.0048.00045.00042.5000135.5045.170.00£0.00000000#DIV/0!0.00£0.00514.0042.8300000.00#DIV/0!0.00£0.0000000.00#DIV/0!0.00£0.00000000#DIV/0!0.00£0.0000000.00#DIV/0!0.00£0.000.00#DIV/0!00000.00#DIV/0!0.00£0.00000000#DIV/0!0.00£0.0000000.00#DIV/0!0.00£0.0000000.00#DIV/0!0.00£0.000.00#DIV/0!
5
6
7
8
9
10Drop Down for months ->as in columns T, AG etc etc
11
12RegionRegion2HUBEmployee NameRoleContractCost
13<- cost for selected month from drop down list depend on columns i.e. Jan OT Cost, Feb OT Cost, etc etc. only for values >over i.e 500
14
15
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
FV2:FV4Cell Valuebetween $F2 and 48textNO
DQ2:DQ4Cell Valuebetween $F2 and 48textNO
BL2:BL4Cell Valuebetween $F2 and 48textNO
FV2:FV4Expression=$FV2<$F2textNO
FV2:FV4Expression=$FV2=$F2textNO
FV2:FV4Expression=$FV2>48textNO
DQ2:DQ4Expression=$DQ2<$F2textNO
DQ2:DQ4Expression=$DQ2=$F2textNO
DQ2:DQ4Expression=$DQ2>48textNO
BL2:BL4Expression=$BL2<$F2textNO
BL2:BL4Expression=$BL2=$F2textNO
BL2:BL4Expression=$BL2>48textNO
T2:T4,AG2:AG4,AT2:AT4,BI2:BI4,BY2:BY4,CL2:CL4,DA2:DA4,DN2:DN4,ED2:ED4,ES2:ES4,FF2:FF4,FS2:FS4Cell Value>850textNO
T2:T4,AG2:AG4,AT2:AT4,BI2:BI4,BY2:BY4,CL2:CL4,DA2:DA4,DN2:DN4,ED2:ED4,ES2:ES4,FF2:FF4,FS2:FS4Cell Valuebetween 650 and 849textNO
T2:T4,AG2:AG4,AT2:AT4,BI2:BI4,BY2:BY4,CL2:CL4,DA2:DA4,DN2:DN4,ED2:ED4,ES2:ES4,FF2:FF4,FS2:FS4Cell Valuebetween 500 and 649textNO
 
Upvote 0
I don't quite understand what is needed here, but I had a go:

MrExcelPlayground24.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBEBFBGBHBI
1RegionRegion2HUBEmployee NameRoleContract30-DecOT 30-Dec6-JanOT 06-Jan13-JanOT 13-Jan20-JanOT 20-Jan27-JanOT 27-JanJan Total HoursJan Average HoursJan Total OT HoursJan OT CostColumn73-FebOT 03-Feb10-FebOT 10-Feb17-FebOT 17-Feb24-FebOT 24-FebFeb Total HoursFeb Average HoursFeb Total OT HoursFeb OT CostColumn163-MarOT 03-Mar10-MarOT 10-Mar17-MarOT 17-Mar24-MarOT 24-MarMar Total HoursMar Average HoursMar Total OT HoursMar OT CostColumn131-MarOT 31-Mar7-AprOT 07-Apr14-AprOT 14-Apr21-AprOT 21-Apr28-AprOT 28-AprApr Total HoursApr Average HoursApr Total OT HoursApr OT Cost
2SouthSouth CentralBBBoooooWRH4040042.752.75466422466216.7543.3510.75174.687544442.752.7541.51.539.7501684214.25231.562540.50.54004110121.540.51.524.375000000#DIV/0!00
3SouthSouth WestAAAggggghWRH4042244443.753.7541.251.2542.252.25213.2542.6511178.7542.52.540.250.2541.51.545.255.25169.542.3756.5105.62540040.250.254000120.2540.083335.589.375000000#DIV/0!00
4SouthSouth EastCCCfshjLCV4848042039.5037.5041.50208.541.70042.5042.5042.5042.5017042.50048045042.500135.545.1666700000000#DIV/0!00
5
6
7
8
9
10Drop Down for months ->Feb33Jan20
11Feb33
12RegionRegion2HUBEmployee NameRoleContractCostMar46
13SouthSouth CentralBBBoooooWRH40231.5625<- cost for selected month from drop down list depend on columns i.e. Jan OT Cost, Feb OT Cost, etc etc. only for values >over i.e 500Apr61
14SouthSouth WestAAAggggghWRH40105.625May77
15SouthSouth EastCCCfshjLCV480Jun90
16Jul105
17Aug118
18Sep134
19Oct149
20Nov162
21Dec175
Sheet11
Cell Formulas
RangeFormula
G10G10=XLOOKUP(E10,M10:M21,N10#,"",0)
N10:N21N10=XMATCH(M10:M21&" OT Cost",1:1,0)
A13:G15A13=LET(a,A2:F4,b,OFFSET(A2,0,G10-1,ROWS(a),1),HSTACK(a,b))
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
E10List=$M$10:$M$21
 
Upvote 0

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