Returning the Max Index and Sum in Lookup

jamesbeale

New Member
Joined
Jan 10, 2018
Messages
2
Hi all,
I have a 2 column table which contains customer names and order values. As customers place more orders, they are added to the table, therefore I have multiple entries for each customer.
Can someone advise on how I can retrieve the customer name and cumulative total for that has the customer that has the highest cumulative value of all orders?

Example below, what I want to return is "Customer A - 900.00"

AB
1Customer A100.00
2Customer B200.00
3Customer C300.00
4Customer A200.00
5Customer C50.00
6Customer A400.00
7Customer B100.00
8Customer A200.00

<tbody>
</tbody>

Thanks.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Ok, got ya.

Here's one way.

in C1
=SUMIF(A$1:A$8,A1,B$1:B$8)
and copy down

in D1
=INDEX(A1:A8,MATCH(MAX(C$1:C$8),C$1:C$8,0),1)

in E1
MAX(C1:C8)

D1 and E1 contain Customer name and highest cumulative total.

I can't quickly see a way of doing this in one go.

Something you should consider too:
What happens if there's more than one customer with the highest cumulative total?
This solution will only list the first one.
 
Upvote 0

Forum statistics

Threads
1,216,175
Messages
6,129,300
Members
449,499
Latest member
HockeyBoi

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