riskier4ra
Board Regular
- Joined
- Dec 5, 2017
- Messages
- 101
Hi, anyone have an idea on how I can get these formulas to work as one.
I am trying to get an average on stock price. I found an excel sheet that was using the following formula
=IF(OR(D22="err",D23="err"),"err",D22/D23)
D22 = Total Cost = =IF(OR(D8="err",D12="err",D16="err",D20="err"),"err",SUM(D8,D12,D16,D20))
D33 = Total Shares = =IF(OR(C8<0,C12<0,C16<0,C20<0),"err",C6+C10+C14+C18)
I also have my own that works using this formula
IFERROR(ABS(AVERAGEIF(E18:G27,E7,G18:G27)),0)
In E:18:G27 = Symbol, #Shares , Buy Price
E7 = Symbol
The reason I am trying to figure out how to merge them is because the 1st one actually gives a correct average when adding new buys.
Mine doesnt seem to work right.
To use the 1st option I would have to reformat my page. Not a good solution for me. I simply want the formula to look at E18:G27, find the symbols = E7, its #of shares, sum up the buy price of what is found, then divide the total cost against the total shares. Is this possible?
Thanks - Risk
I am trying to get an average on stock price. I found an excel sheet that was using the following formula
=IF(OR(D22="err",D23="err"),"err",D22/D23)
D22 = Total Cost = =IF(OR(D8="err",D12="err",D16="err",D20="err"),"err",SUM(D8,D12,D16,D20))
D33 = Total Shares = =IF(OR(C8<0,C12<0,C16<0,C20<0),"err",C6+C10+C14+C18)
I also have my own that works using this formula
IFERROR(ABS(AVERAGEIF(E18:G27,E7,G18:G27)),0)
In E:18:G27 = Symbol, #Shares , Buy Price
E7 = Symbol
The reason I am trying to figure out how to merge them is because the 1st one actually gives a correct average when adding new buys.
Mine doesnt seem to work right.
To use the 1st option I would have to reformat my page. Not a good solution for me. I simply want the formula to look at E18:G27, find the symbols = E7, its #of shares, sum up the buy price of what is found, then divide the total cost against the total shares. Is this possible?
Thanks - Risk