I need help finding the maximum value of A for the day. If the maximum occurs several times, return the maximum A value equal to or closest > to 16:00.
Example:
Date A B C
1/1/05 14:00 300 10 5
1/1/05 15:00 300 8 3
1/1/05 16:00 100 5 12
1/1/05 17:00 300 5 5
1/1/05 18:00 300 10 20
1/2/05 14:00 200 10 10
1/2/05 15:00 500 7 6
1/2/05 16:00 500 20 50
1/2/05 17:00 400 18 60
1/2/05 18:00 500 2 20
Results should be:
1/1/05 17:00 300 5 5
1/2/05 16:00 500 20 50
I've tried grouping and use MAX, didn't work of course.
Help!
TIA
Wendy
Example:
Date A B C
1/1/05 14:00 300 10 5
1/1/05 15:00 300 8 3
1/1/05 16:00 100 5 12
1/1/05 17:00 300 5 5
1/1/05 18:00 300 10 20
1/2/05 14:00 200 10 10
1/2/05 15:00 500 7 6
1/2/05 16:00 500 20 50
1/2/05 17:00 400 18 60
1/2/05 18:00 500 2 20
Results should be:
1/1/05 17:00 300 5 5
1/2/05 16:00 500 20 50
I've tried grouping and use MAX, didn't work of course.
Help!
TIA
Wendy