I have the attached document and on Sheet 1 is a breakdown of each different trade we did. Each blank row divides the different trades. Originally, some trades may have several pieces going to the same custodian. Is there a general function to write that says for each trade, if the custodian in column G is the same, then sum the quantities in column I and place that quantity in the in column J (and in the first row in which the custodian name first appears).
Sheet 2 has the desired results.
I can't figure out either a sum if function or some other way to have it sum the quantities for each custodian, and be able to differentiate between each block trade.