I need a formula to help me in Excel to get the average of the below
buy 100$ X rate 1500 = 150000
buy 150 X rate 1505 = 225750
buy 125 X rate 1507 = 188375
Sell 250 X Rate 1512 = 378000
I need a formula to tell me what is the average rate of the remaining balance of buy - sell total amount