If multiple duplicate values, then return max value from third cell

saintbernard

New Member
Joined
Jun 27, 2018
Messages
3
Hi,
I have an excel table with 20000 lines. Here is a short sample it, with license plate number (column B) which last process phase they have gone through. There are some duplicate values in the plate numbers, which have been indicated in column C. In column D, I would like to return for each line, what the highest process phase was of that plate number.
Can anyone help with a formula?

[TABLE="width: 500, align: left"]
<tbody>[TR]
[TD]A
Last process phase[/TD]
[TD]B
Plate Number[/TD]
[TD]C
Duplicate or original[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1ABC123[/TD]
[TD]Duplicate[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1ABC123[/TD]
[TD]Duplicate[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1ABC123[/TD]
[TD]Duplicate[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]ZZZ123[/TD]
[TD]Original[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]1CBA321[/TD]
[TD]Original[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1HIJ456[/TD]
[TD]Duplicate[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]1HIJ456[/TD]
[TD]Duplicate[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]1HIJ456[/TD]
[TD]Duplicate[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]AAA444[/TD]
[TD]Original[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi and welcome to MrExcel,

take a look at this:

Book1
ABCD
1Last process phasePlate NumberDuplicate or original
211ABC123Duplicate2
311ABC123Duplicate2
421ABC123Duplicate2
52ZZZ123Original2
631CBA321Original3
711HIJ456Duplicate4
811HIJ456Duplicate4
941HIJ456Duplicate4
103AAA444Original3
Sheet1
Cell Formulas
RangeFormula
D2{=MAX(IF($B$2:$B$10=B2,$A$2:$A$10))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Hi and welcome to MrExcel,

take a look at this:
ABCD
Last process phasePlate NumberDuplicate or original
1ABC123Duplicate
1ABC123Duplicate
1ABC123Duplicate
ZZZ123Original
1CBA321Original
1HIJ456Duplicate
1HIJ456Duplicate
1HIJ456Duplicate
AAA444Original

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"][/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]1[/TD]

[TD="align: right"]2[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]1[/TD]

[TD="align: right"]2[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]2[/TD]

[TD="align: right"]2[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]2[/TD]

[TD="align: right"]2[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"]3[/TD]

[TD="align: right"]3[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]1[/TD]

[TD="align: right"]4[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"]1[/TD]

[TD="align: right"]4[/TD]

[TD="align: center"]9[/TD]
[TD="align: right"]4[/TD]

[TD="align: right"]4[/TD]

[TD="align: center"]10[/TD]
[TD="align: right"]3[/TD]

[TD="align: right"]3[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Array Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]D2[/TH]
[TD="align: left"]{=MAX(IF($B$2:$B$10=B2,$A$2:$A$10))}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]


Thanks, but it doesn't work, I get 4 for each row.
I want in each row, the highest process phase per plate number.
 
Upvote 0
Did you notice this remark:

Entered with Ctrl+Shift+Enter.

If entered correctly, Excel will surround with curly braces {}.
 
Upvote 0
Adjust range inputs to suit, non-CSE/'normal' formula, try:
Code:
=MAX(INDEX(($B$1:$B$200=B1)*$A$1:$A$200,0))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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