Return Largest Number with Multiple Entries

ROSE217

New Member
Joined
Jun 27, 2017
Messages
6
Hello everyone,

I hope you can help me with this, I've been struggling with it for a while. I have a large spreadsheet with over 100,000 rows. I need to find the largest number associated with a users id, there are multiple values associated with the user ID but I want to return the largest number associated to the user. Here's an example below, user ID 00300000002ayxtAAA has the values 4, 8, 2, 9, 2 associated with it, I need to return the number 9 (the highest value) in a column next to each entry of the users ID.

[TABLE="width: 496"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]00300000002auuQAAQ[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002auuQAAQ[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002auuQAAQ[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD="align: right"]4 [/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD="align: right"]8 [/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD="align: right"]2 [/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD="align: right"]9 [/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD="align: right"]2 [/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002bnjJAAQ[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002bnjJAAQ[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002bnjJAAQ[/TD]
[/TR]
[TR]
[TD="align: right"]4 [/TD]
[TD]00300000002bnjJAAQ[/TD]
[/TR]
[TR]
[TD="align: right"]9 [/TD]
[TD]00300000002bnjJAAQ[/TD]
[/TR]
[TR]
[TD="align: right"]2 [/TD]
[TD]00300000002bnjJAAQ[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002bnjJAAQ[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002bnjJAAQ[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002bnjJAAQ[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002bnjJAAQ[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002cuh1AAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002cuh1AAA[/TD]
[/TR]
[TR]
[TD="align: right"]2 [/TD]
[TD]00300000002cuh1AAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002cuh1AAA[/TD]
[/TR]
[TR]
[TD="align: right"]1 [/TD]
[TD]00300000002cuh1AAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002cuh1AAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002cuh1AAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002cuh1AAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002cuh1AAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002cuh1AAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002cuh1AAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002cuh1AAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002cuh1AAA[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]00300000002cuh1AAA[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Book1
ABC
100300000002auuQAAQ0
200300000002auuQAAQ0
300300000002auuQAAQ0
400300000002ayxtAAA9
500300000002ayxtAAA9
600300000002ayxtAAA9
700300000002ayxtAAA9
8400300000002ayxtAAA9
9800300000002ayxtAAA9
10200300000002ayxtAAA9
1100300000002ayxtAAA9
12900300000002ayxtAAA9
1300300000002ayxtAAA9
1400300000002ayxtAAA9
15200300000002ayxtAAA9
1600300000002ayxtAAA9
1700300000002ayxtAAA9
1800300000002ayxtAAA9
1900300000002ayxtAAA9
2000300000002ayxtAAA9
2100300000002bnjJAAQ9
2200300000002bnjJAAQ9
2300300000002bnjJAAQ9
24400300000002bnjJAAQ9
25900300000002bnjJAAQ9
26200300000002bnjJAAQ9
2700300000002bnjJAAQ9
2800300000002bnjJAAQ9
2900300000002bnjJAAQ9
3000300000002bnjJAAQ9
3100300000002cuh1AAA2
3200300000002cuh1AAA2
33200300000002cuh1AAA2
3400300000002cuh1AAA2
35100300000002cuh1AAA2
3600300000002cuh1AAA2
3700300000002cuh1AAA2
3800300000002cuh1AAA2
3900300000002cuh1AAA2
4000300000002cuh1AAA2
4100300000002cuh1AAA2
4200300000002cuh1AAA2
4300300000002cuh1AAA2
4400300000002cuh1AAA2
Sheet1
Cell Formulas
RangeFormula
C1{=MAX(IF($B$1:$B$44=$B1,$A$1:$A$44))}
Press CTRL+SHIFT+ENTER to enter array formulas.


WBD
 
Upvote 0
you could try this array formula,

{=IF(B:B="00300000002auuQAAQ",MAX(A:A))}
Use CTRL + SHFT + ENTER to make it an array
 
Upvote 0
Is it possible to sort the data by user ID and by this number (descending)?

What I'd do would be:

1) Sort the data by user ID ascending, Number descending
2) Copy user ID column to other place of this sheet or to another sheet
3) Remove duplicates
4) Write this formula and fill it down (sorry in this format, but I have problems with HTMLMaker):

=INDEX(A:A;MATCH(F2;B:B;0))

5) This way you will more clear view on max number for every user:

[TABLE="width: 223"]
<tbody>[TR]
[TD="class: xl65, width: 81"]Max number[/TD]
[TD="class: xl65, width: 142"]User ID[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]0[/TD]
[TD="class: xl66, width: 142"]00300000002auuQAAQ[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]9[/TD]
[TD="class: xl66, width: 142"]00300000002ayxtAAA[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]9[/TD]
[TD="class: xl66, width: 142"]00300000002bnjJAAQ[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]2[/TD]
[TD="class: xl66, width: 142"]00300000002cuh1AAA[/TD]
[/TR]
</tbody>[/TABLE]


P.s. I wonder if array formula is efficient enough for over 100 000 rows...
 
Upvote 0
Very Valid Point ?!?!
Would probably be ok if looking at say one User ID. but if its a working document with more calculations it would probably fail

I actually got it to work, it took the document a long time to process it and it crashed a few times but I'm happy with the result, thanks for your help :)
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
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