I have this values in my excel:
A B C D
StaffId FSales ESales Date
1 100 500 23-Jan-13
1 50 170 25-Jan-13
1 70 230 26-Jan-13
2 100 300 25-Jan-13
2 130 200 27-Jan-13
Outcome wanted:
A B C D
StaffId FSales ESales Date
1 100 500 23-Jan-13 10:00:00AM
1 50 170 25-Jan-13 11:00:00AM
1 70 230 26-Jan-13 11:30:00AM
2 100 300 25-Jan-13 03:00:00PM
2 130 200 27-Jan-13 02:00:00PM
3 100 200 29-Jan-13 01:01:00PM
3 90 209 29-Jan-13 01:00:00PM
A B C D
StaffId FSales ESales Date
1 70 230 26-Jan-13 11:30:00AM
2 130 200 27-Jan-13 02:00:00PM
3 100 200 29-Jan-13 01:01:00PM
Lets say dates are jumbled up and not arranged in any order. How can i get the latest date Fsales and ESales for each staff?
Meaning getting 70 230 for staffid 1 and 130 200 for staffid 2.
Help needed please
Assuming you have the second list with the unique staff ID in Sheet2 and the original list in Sheet1, starting in row 2, enter the following formula:
FSales max in Sheet2!B2:
=INDEX(Sheet1!$B:$B,MATCH(MAX(Sheet1!$D:$D*(Sheet1!$A:$A=A2)),(Sheet1!$D:$D*(Sheet1!$A:$A=A2)),0))ESales max in Sheet2!C2:
=INDEX(Sheet1!$C:$C,MATCH(MAX(Sheet1!$D:$D*(Sheet1!$A:$A=A2)),(Sheet1!$D:$D*(Sheet1!$A:$A=A2)),0))Both formulas are array-formulas, i.e. enter them with Ctrl–Shift–Enter instead of Enter.