February 17, 2021
July 16, 2010
Welcome to our forum!
As explained in my reply on YouTube,
"You'd need to add a column (to the ledger table) that marks shares as sold so you can then exclude those shares in your formulas with another criteria in the SUMIFS formula.
Please attempt this yourself. If you get stuck, please post your question and Excel file on our forum showing your attempt and we can help you further."
We can't do your work for you, we can only help you if you get stuck trying to do it yourself.