Populate Name Based On Highest Amount and Date

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
928
Office Version
  1. 365
Hi,

I have the following set of data:

Excel Workbook
BCD
3DateAmountName
401-01-15250Lev
505-04-153665John
608-07-15587Suzanne
709-05-15450Jane
821-10-16120John
921-10-161350John
1021-10-16250Keith
1121-10-161470May
1221-10-16258Suzanne
1321-10-16569Suzanne
1422-10-16458Lev
1522-10-16874John
1622-10-16158Kerry
1722-10-16963Kerry
1830-10-16100May
1930-10-16254Suzanne
2030-10-16125Jane
2130-10-16365Lev
2230-10-16785Lev
Sheet2




I need to populate the following:

a) Person with highest amount for the latest date
b) Person with the highest amount by each month
c) Person with the highest amount for YTD 2016 and YTD 2015

I managed to get the highest amount for the latest date with the following formula but beyond that I am stuck.Appreciate all the help.

{=MAX(IF(Sheet2!B4:B22=D3,Sheet2!C4:C22))}
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
That is a tall order...

Row\Col
A​
B​
C​
D​
E​
F​
G​
H​
I​
1​
5​
2​
max amt latest datemonthname(s)
3​
DateAmountName
10/30/2016​
1/1/2015
Lev
4​
1/1/2015
250
Lev
785​
4/1/2015
John
5​
4/5/2015
3665
John
name(s)
5/1/2015
Jane
6​
7/8/2015
587
Suzanne
Linda
7/1/2015
Suzanne
7​
5/9/2015
450
Jane
Lev
10/1/2016
RobMay
8​
10/20/2016​
1470
Rob
9​
10/21/2016
120
John
10​
10/21/2016
1350
John
11​
10/21/2016
250
Keith
12​
10/21/2016
1470
May
13​
10/21/2016
258
Suzanne
14​
10/21/2016
569
Suzanne
15​
10/22/2016
458
Lev
16​
10/22/2016
874
John
17​
10/22/2016
158
Kerry
18​
10/22/2016
963
Kerry
19​
10/30/2016
100
May
20​
10/30/2016
254
Suzanne
21​
10/30/2016
125
Jane
22​
10/30/2016
785
Linda
23​
10/30/2016
365
Lev
24​
10/30/2016
785
Lev

<tbody>
</tbody>


(a) In E3 just enter:

=MAX($A$4:$A$24)

In E4 control+shift+enter, not just enter:

=MAX(IF($A$4:$A$24=E3,$B$4:$B$24))

In E6 control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX($C$4:$C$24,SMALL(IF($B$4:$B$24=E$4,ROW($C$4:$C$24)-ROW($C$4)+1),ROWS($E$6:E6))),"")

(b) In F1 control+shift+enter:

=SUM(IF(FREQUENCY(IF(ISNUMBER($A$4:$A$24),$A$4:$A$24-DAY($A$4:$A$24)+1),$A$4:$A$24-DAY($A$4:$A$24)+1),1))

In F3 control+shift+enter and copy down:

=IF(ROWS(F$3:F3)>$F$1,"",MIN(IF(ISNA(MATCH($A$4:$A$24-DAY($A$4:$A$24)+1,$F$2:F2,0)),$A$4:$A$24-DAY($A$4:$A$24)+1)))

In G3 control+shift+enter, copy across, and down:

=IFERROR(INDEX($C$4:$C$24,SMALL(IF($A$4:$A$24-DAY($A$4:$A$24)+1=$F3,IF($B$4:$B$24=MAX(IF($A$4:$A$24-DAY($A$4:$A$24)+1=$F3,$B$4:$B$24)),ROW($C$4:$C$24)-ROW($C$4)+1)),COLUMNS($G3:G3))),"")

(c) YTD names I leave to you...
 
Upvote 0
Hi Aladin,

Thank you so much for your time and patience. I used the formula but I am getting as follows for (b):

Excel Workbook
ABCDEFG
2****max amt latest datemonthname(s)
3DateAmountName*30-10-1610
401-01-15250Lev*785**
505-04-153665John****
608-07-15587Suzanne*Lev**
709-05-15450Jane****
821-10-16120John****
921-10-161350John****
1021-10-16250Keith****
1121-10-161470May****
1221-10-16258Suzanne****
1321-10-16569Suzanne****
1422-10-16458Lev****
1522-10-16874John****
1622-10-16158Kerry****
1722-10-16963Kerry****
1830-10-16100May****
1930-10-16254Suzanne****
2030-10-16125Jane****
2130-10-16365Lev****
2230-10-16785Lev****
Sheet2



For (c), is there suppose to be a formula in cell H7?
 
Upvote 0

Forum statistics

Threads
1,217,414
Messages
6,136,492
Members
450,016
Latest member
murarj

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