Search criteria in one column and find maximum corresponding value in another column, then show maximum value in every row that matches original crite

Josh_Hawthorn

New Member
Joined
Oct 10, 2017
Messages
2
Hi.

I would really appreciate some help with the below.

Column A is the order number, B is the status of the indvidual line, C reflects B numerically with a "1" for complete and "0" for incomplete.

If A1 = A2 then D is blank, if there is a difference then the completion % is displayed.

I would like column E to show the max value of column D for each value shown in column A.

For example E1:E3 would each show a value of 33%.

[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Incomplete[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Incomplete[/TD]
[TD]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Complete[/TD]
[TD]1[/TD]
[TD]33%[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Complete[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Incomplete[/TD]
[TD]0[/TD]
[TD]50%[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Complete[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Complete[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Complete[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Complete[/TD]
[TD]1[/TD]
[TD]100%[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Any help with this would be amazing!! Thanks!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi Josh,

You could try this one,

There's no 'MAXIF' formula by default in Excel, an array formula can circumvent this, you'll need to add this using CTRL+SHIFT+ENTER instead of just ENTER (Excel will add {} around it)

[TABLE="class: grid, width: 369"]
<tbody>[TR]
[TD="align: right"]A[/TD]
[TD]B[/TD]
[TD="align: right"]C[/TD]
[TD]D[/TD]
[TD="align: right"]E[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]Incomplete[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD="align: right"][TABLE="width: 432"]
<tbody>[TR]
[TD="width: 432"]=MAX(IF(A$1:A$9=A1,D$1:D$9))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]Incomplete[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD="align: right"]33%[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD]Complete[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]33%[/TD]
[TD="align: right"]33%[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]Complete[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]50%[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD]Incomplete[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]50%[/TD]
[TD="align: right"]50%[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]Complete[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]100%[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]Complete[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]100%[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]Complete[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]100%[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD]Complete[/TD]
[TD="align: right"]1[/TD]
[TD="align: center"]100%[/TD]
[TD="align: right"]100%[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Hi Josh,You could try this one,There's no 'MAXIF' formula by default in Excel, an array formula can circumvent this, you'll need to add this using CTRL+SHIFT+ENTER instead of just ENTER (Excel will add {} around it)[TABLE="class: grid, width: 369"]<tbody>[TR][TD="align: right"]A[/TD][TD]B[/TD][TD="align: right"]C[/TD][TD]D[/TD][TD="align: right"]E[/TD][/TR][TR][TD="align: right"]1[/TD][TD]Incomplete[/TD][TD="align: right"]0[/TD][TD][/TD][TD="align: right"][TABLE="width: 432"]<tbody>[TR] [TD="width: 432"]=MAX(IF(A$1:A$9=A1,D$1:D$9))[/TD][/TR]</tbody>[/TABLE][/TD][/TR][TR][TD="align: right"]1[/TD][TD]Incomplete[/TD][TD="align: right"]0[/TD][TD][/TD][TD="align: right"]33%[/TD][/TR][TR][TD="align: right"]1[/TD][TD]Complete[/TD][TD="align: right"]1[/TD][TD="align: right"]33%[/TD][TD="align: right"]33%[/TD][/TR][TR][TD="align: right"]2[/TD][TD]Complete[/TD][TD="align: right"]1[/TD][TD][/TD][TD="align: right"]50%[/TD][/TR][TR][TD="align: right"]2[/TD][TD]Incomplete[/TD][TD="align: right"]0[/TD][TD="align: right"]50%[/TD][TD="align: right"]50%[/TD][/TR][TR][TD="align: right"]3[/TD][TD]Complete[/TD][TD="align: right"]1[/TD][TD][/TD][TD="align: right"]100%[/TD][/TR][TR][TD="align: right"]3[/TD][TD]Complete[/TD][TD="align: right"]1[/TD][TD][/TD][TD="align: right"]100%[/TD][/TR][TR][TD="align: right"]3[/TD][TD]Complete[/TD][TD="align: right"]1[/TD][TD][/TD][TD="align: right"]100%[/TD][/TR][TR][TD="align: right"]3[/TD][TD]Complete[/TD][TD="align: right"]1[/TD][TD="align: center"]100%[/TD][TD="align: right"]100%[/TD][/TR]</tbody>[/TABLE]
This works perfectly!!
 
Upvote 0
There's no 'MAXIF' formula by default in Excel,
There is in Excel 2016. (It's actually MAXIFS but will do the same job)


@Josh
Whilst you have a perfectly good answer, here are 3 more, none of which requires the Ctrl+Shift+Enter confirmation but the MAXIFS does require Excel 2016 and the AGGREGATE requires Excel 2010 or later.
The last one is the simplest but does require the column to be filled down before each one shows the correct result. :)


Book1
ABCDEFG
1
21Incomplete033%33%33%
31Incomplete033%33%33%
41Complete133%33%33%33%
52Complete150%50%50%
62Incomplete050%50%50%50%
73Complete1100%100%100%
83Complete1100%100%100%
93Complete1100%100%100%
103Complete1100%100%100%100%
Max per Order
Cell Formulas
RangeFormula
E2=MAXIFS(D$2:D$10,A$2:A$10,A2)
F2=AGGREGATE(14,6,D$2:D$10/(A$2:A$10=A2),1)
G2=IF(D2,D2,G3)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

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