Sure, thanks for your swift reply.
There are groups with a unique identier - Benkey
Presented below are only two, one above and another below the red line.
The amounts in the yellow box will be summed if any of the dates in 2nd column are less than the lowest (earliest) date in the 3rd column.
In the top group, because all dates are less than 20170121, the amounts in the yellow box will be summed and place in the top right line.
In the bottom group, only 5 dates in the green box are less than the lowest/earliest date in the 3rd column (20140515), so only the amounts in the yellow box will be summed and placed in the top right line.
Really appreciate your help with this.