xlookup error proofing & cascade searching

Afro_Cookie

Board Regular
Joined
Mar 17, 2020
Messages
103
Office Version
  1. 365
Platform
  1. Windows
Can xlookup perform a cascade search in the event multiple rows show the same data?

I have some data I'm collating and analyzing to see which value is the largest and showing it at the top of the list. However, when there are two values that are the same, it only pulls the first instance, showing a duplicate of the data. I would like it to look at the first column, then if the numbers are the same, look at the second, and cascade down until it finds the unique value and uses that as the search reference for Xlookup.

Xl2BB isn't working right now due to new security, but I am posting the data and the formula used to hopefully help understand my file.

Columns A:D are raw data
Columns F:I are using a count if statement to see how many values are within my specified range for each category (Score 1: <0.300, Score 2: 0.300<0.500, Score 3: >0.500)
Column O is using the =Large() function to find the largest value
Columns L:N use Xlookup based on O:O to return the other values.
Column L is what I want to be unique after Columns L:O are populated.

As you can see in Column L, there are two instances of 'C' where one should be 'F'

ABCDEFGHIJKLMNO
SubjectScore 1Score 2Score 3SubjectScore 1Score 2Score 3SubjectScore 1Score 2Score 3
a
0.609​
0.841​
0.629​
a
16​
10​
17​
1​
e
10​
3​
30​
b
0.425​
0.278​
0.496​
b
16​
8​
18​
2​
d
12​
7​
24​
c
0.855​
0.770​
0.385​
c
9​
11​
23​
3​
c
9​
11​
23​
d
0.849​
0.798​
0.002​
d
12​
7​
24​
4​
c
9​
11​
23​
e
0.505​
0.406​
0.750​
e
10​
3​
30​
5​
b
16​
8​
18​
f
0.332​
0.365​
0.055​
f
11​
9​
23​
6​
a
16​
10​
17​
a
0.591​
0.775​
0.462​
b
0.049​
0.415​
0.629​
c
0.294​
0.661​
0.771​
d
0.443​
0.504​
0.828​
e
0.611​
0.322​
0.394​
f
0.899​
0.687​
0.302​
a
0.226​
0.919​
0.649​
b
0.269​
0.220​
0.755​
c
0.606​
0.824​
0.515​
d
0.032​
0.250​
0.506​
e
0.263​
0.538​
0.176​
f
0.290​
0.899​
0.947​
a
0.151​
0.812​
0.398​
b
0.978​
0.973​
0.114​
c
0.441​
0.469​
0.537​
d
0.734​
0.000​
0.367​
e
0.630​
0.942​
0.819​
f
0.593​
0.167​
0.971​
a
0.852​
0.680​
0.414​
b
0.225​
0.242​
0.482​
c
0.717​
0.896​
0.414​
d
0.644​
0.449​
0.068​
e
0.963​
0.684​
0.803​
f
0.751​
0.387​
0.243​
a
0.059​
0.861​
0.581​
b
0.407​
0.164​
0.374​
c
0.365​
0.305​
0.449​
d
0.757​
0.965​
0.942​
e
0.981​
0.833​
0.218​
f
0.262​
0.402​
0.983​
a
0.163​
0.633​
0.894​
b
0.035​
0.613​
0.327​
c
0.410​
0.528​
0.289​
d
0.110​
0.625​
0.945​
e
0.844​
0.040​
0.556​
f
0.653​
0.380​
0.985​
a
0.013​
0.661​
0.720​
b
0.763​
0.286​
0.853​
c
0.025​
0.009​
0.328​
d
0.928​
0.083​
0.105​
e
0.057​
0.425​
0.196​
f
0.597​
0.726​
0.281​
a
0.348​
0.379​
0.847​
b
0.293​
0.200​
0.517​
c
0.940​
0.799​
0.212​
d
0.518​
0.833​
0.943​
e
0.614​
0.430​
0.726​
f
0.148​
0.015​
0.906​
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
How about
Fluff.xlsm
ABCDKLMNO
1SubjectScore 1Score 2Score 3SubjectScore 1Score 2Score 3
2a0.6090.8410.6291a516
3b0.4250.2780.4962d215
4c0.8550.770.3853e245
5d0.8490.7980.0024f345
6e0.5050.4060.755b514
7f0.3320.3650.0556c223
8a0.5910.7750.462
9b0.0490.4150.629
10c0.2940.6610.771
11d0.4430.5040.828
12e0.6110.3220.394
13f0.8990.6870.302
14a0.2260.9190.649
15b0.2690.220.755
16c0.6060.8240.515
17d0.0320.250.506
18e0.2630.5380.176
19f0.290.8990.947
20a0.1510.8120.398
21b0.9780.9730.114
22c0.4410.4690.537
23d0.73400.367
24e0.630.9420.819
25f0.5930.1670.971
26a0.8520.680.414
27b0.2250.2420.482
28c0.7170.8960.414
29d0.6440.4490.068
30e0.9630.6840.803
31f0.7510.3870.243
32a0.0590.8610.581
33b0.4070.1640.374
34c0.3650.3050.449
35d0.7570.9650.942
36e0.9810.8330.218
37f0.2620.4020.983
38a0.1630.6330.894
39b0.0350.6130.327
40c0.410.5280.289
41d0.110.6250.945
42e0.8440.040.556
43f0.6530.380.985
44a0.0130.6610.72
45b0.7630.2860.853
46c0.0250.0090.328
47d0.9280.0830.105
48e0.0570.4250.196
49f0.5970.7260.281
50a0.3480.3790.847
51b0.2930.20.517
52c0.940.7990.212
53d0.5180.8330.943
54e0.6140.430.726
55f0.1480.0150.906
Master
Cell Formulas
RangeFormula
L2:O7L2=LET(u,UNIQUE(A2:A55),SORT(HSTACK(u,COUNTIFS(A:A,u,B:B,"<0.3"),COUNTIFS(A:A,u,C:C,"<0.5",C:C,">0.3"),COUNTIFS(A:A,u,D:D,">0.5")),4,-1))
Dynamic array formulas.
 
Upvote 0
Solution
How about
Fluff.xlsm
ABCDKLMNO
1SubjectScore 1Score 2Score 3SubjectScore 1Score 2Score 3
2a0.6090.8410.6291a516
3b0.4250.2780.4962d215
4c0.8550.770.3853e245
5d0.8490.7980.0024f345
6e0.5050.4060.755b514
7f0.3320.3650.0556c223
8a0.5910.7750.462
9b0.0490.4150.629
10c0.2940.6610.771
11d0.4430.5040.828
12e0.6110.3220.394
13f0.8990.6870.302
14a0.2260.9190.649
15b0.2690.220.755
16c0.6060.8240.515
17d0.0320.250.506
18e0.2630.5380.176
19f0.290.8990.947
20a0.1510.8120.398
21b0.9780.9730.114
22c0.4410.4690.537
23d0.73400.367
24e0.630.9420.819
25f0.5930.1670.971
26a0.8520.680.414
27b0.2250.2420.482
28c0.7170.8960.414
29d0.6440.4490.068
30e0.9630.6840.803
31f0.7510.3870.243
32a0.0590.8610.581
33b0.4070.1640.374
34c0.3650.3050.449
35d0.7570.9650.942
36e0.9810.8330.218
37f0.2620.4020.983
38a0.1630.6330.894
39b0.0350.6130.327
40c0.410.5280.289
41d0.110.6250.945
42e0.8440.040.556
43f0.6530.380.985
44a0.0130.6610.72
45b0.7630.2860.853
46c0.0250.0090.328
47d0.9280.0830.105
48e0.0570.4250.196
49f0.5970.7260.281
50a0.3480.3790.847
51b0.2930.20.517
52c0.940.7990.212
53d0.5180.8330.943
54e0.6140.430.726
55f0.1480.0150.906
Master
Cell Formulas
RangeFormula
L2:O7L2=LET(u,UNIQUE(A2:A55),SORT(HSTACK(u,COUNTIFS(A:A,u,B:B,"<0.3"),COUNTIFS(A:A,u,C:C,"<0.5",C:C,">0.3"),COUNTIFS(A:A,u,D:D,">0.5")),4,-1))
Dynamic array formulas.
Thank you Fluff! You never dissapoint. I appreciate the help.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,154
Members
453,021
Latest member
Justyna P

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