Use Filter function with 2 criteria to return a specific value

Frank J

Board Regular
Joined
Feb 17, 2011
Messages
104
Office Version
  1. 365
Platform
  1. Windows
I've spent many hours trying to find out why the basic formula for Filter function with 2 criteria will not return a value other than #CALC.
I'm trying to filter the data below for a specific Patron using the Patron ID and a specific Rating by the Date it occurred using the Time In
The data is in a Table and I've shown a sample below, the Rows/Columns are added for reference.

The formula I've tried many variants of is: SORT(UNIQUE(FILTER(A2:Q8,(I2:I8=S1)*(Q2:Q8=T1))))

S1 is the Date and T1 is the Patron ID, I want to be able to use these cells to look at different players as needed.

A​
B​
C​
D​
E​
F​
G​
H​
I​
J​
K​
L​
M​
N​
O​
P​
Q​
1Last NameFirst NamePitTable IDAvg. BetTime (min)Win/LossTheo. WinTime InTime OutCash InChips InFM/Mkr InTotal InTotal OutRating IDPatron ID
2AltemoAl4PJ 404$103.23
160​
0.62​
1/1/2021 2:00:001/1/2021 2:03:14$40$0$0$40$200328855521302541224
3Refused Name44197.08381CC 101$255.02
(50)​
2.51​
1/1/2021 2:00:401/1/2021 2:05:41$300$0$0$300$250328855393310258222
4Refused Name44197.084252JP 204$155.15
(85)​
1.49​
1/1/2021 2:01:191/1/2021 2:06:28$55$50$0$105$20328855433310258223
5WangLai8MB 801$800490.97
(1,700)​
4,516.89​
1/1/2021 2:02:091/1/2021 10:13:07$0$3,200$0$3,200$1,500328855490310078426
6MosleySam1CC 101$300637.73
(1,800)​
3,826.40​
1/1/2021 2:02:211/1/2021 12:40:05$1,800$500$0$2,300$500328855501310258140
7FuChang2MB 208$50114.78
(950)​
66.00​
1/1/2021 2:02:571/1/2021 3:57:44$0$19,500$0$19,500$18,550328855534303463825
8SteptoeAlbert3HH 307$2080.93
(75)​
25.47​
1/1/2021 2:03:101/1/2021 3:24:06$100$0$0$100$25328855550310229947
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
In that case the only other thing I can think of, is that your Patron IDs are text & T1 is a number, or vice versa.
 
Upvote 0
In that case the only other thing I can think of, is that your Patron IDs are text & T1 is a number, or vice versa.
I just checked and they were both general, i changed them to numbers and still nothing. This has me stumped and I need to resolve it badly.
 
Upvote 0
If you put this into a blank cell what does it return?
Excel Formula:
=ISNUMBER(Q2)

As the formula works for me.
+Fluff 1.xlsm
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAI
1Last NameFirst NamePitTable IDAvg. BetTime (min)Win/LossTheo. WinTime InTime OutCash InChips InFM/Mkr InTotal InTotal OutRating IDPatron ID01/01/2021310258222
2AltemoAl4PJ 404$103.231600.6201/01/2021 02:0001/01/2021 02:03$40$0$0$40$200328855521302541224Refused Name44197.0841CC 101$255.02-502.5144197.0844197.09$300$0$0$300$250328855393310258222
3Refused Name44197.08381CC 101$255.02-502.5101/01/2021 02:0001/01/2021 02:05$300$0$0$300$250328855393310258222
4Refused Name44197.084252JP 204$155.15-851.4901/01/2021 02:0101/01/2021 02:06$55$50$0$105$20328855433310258223
5WangLai8MB 801$800490.97-1,7004,516.8901/01/2021 02:0201/01/2021 10:13$0$3,200$0$3,200$1,500328855490310078426
6MosleySam1CC 101$300637.73-1,8003,826.4001/01/2021 02:0201/01/2021 12:40$1,800$500$0$2,300$500328855501310258140
7FuChang2MB 208$50114.78-9506601/01/2021 02:0201/01/2021 03:57$0$19,500$0$19,500$18,550328855534303463825
8SteptoeAlbert3HH 307$2080.93-7525.4701/01/2021 02:0301/01/2021 03:24$100$0$0$100$25328855550310229947
Summary
Cell Formulas
RangeFormula
S2:AI2S2=SORT(UNIQUE(FILTER(A2:Q8,(INT(I2:I8)=S1)*(Q2:Q8=T1))))
Dynamic array formulas.
 
Upvote 0
When I enter the ISNUMBER in Q2 I get a True back

When i try the formula in S2 I get #calc back again
 
Upvote 0
That error means that there's nothing matching both criteria.
 
Upvote 0
But I know there is a matching data be cause I used the data from the example I sent. Why wouldn't it match?
 
Upvote 0
Which cell in col Q matches T1?
 
Upvote 0
I got it to work since my last, now I'm trying to understand why after I made bottom row have the name & number from the top row to see if it spills the data down but i only see 1 row returned instead of 2. Won't the data filter down?

Last NameFirst NamePitTable IDAvg. BetTime (min)Win/LossTheo. WinTime InTime OutCash InChips InFM/Mkr InTotal InTotal OutRating IDPatron ID
AltemoAl4PJ 404$103.23
160​
0.62​
1/1/2021 2:00:001/1/2021 2:03:14$40$0$0$40$200328855521302541224
Refused Name44197.08381CC 101$255.02
(50)​
2.51​
1/1/2021 2:00:401/1/2021 2:05:41$300$0$0$300$250328855393310258222
Refused Name44197.084252JP 204$155.15
(85)​
1.49​
1/1/2021 2:01:191/1/2021 2:06:28$55$50$0$105$20328855433310258223
WangLai8MB 801$800490.97
(1,700)​
4,516.89​
1/1/2021 2:02:091/1/2021 10:13:07$0$3,200$0$3,200$1,500328855490310078426
MosleySam1CC 101$300637.73
(1,800)​
3,826.40​
1/1/2021 2:02:211/1/2021 12:40:05$1,800$500$0$2,300$500328855501310258140
FuChang2MB 208$50114.78
(950)​
66.00​
1/1/2021 2:02:571/1/2021 3:57:44$0$19,500$0$19,500$18,550328855534303463825
AltemoAl3HH 307$2080.93
(75)​
25.47​
1/1/2021 2:03:101/1/2021 3:24:06$100$0$0$100$25328855550302541224
Data Returned vvvv
AltemoAl4PJ 404
10​
3.23​
160​
0.62​
1/1/21 2:001/1/21 2:03
40​
0​
0​
40​
200​
328855521​
302541224​
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,819
Members
449,469
Latest member
Kingwi11y

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