Forum Discussion
Trying to make my Stock Spreadsheet work
- May 21, 2018
Try updating your formulas to these:
G2: {=IFERROR(INDEX('Transactions(SG)'!$J$2:$J$24,SUMPRODUCT(MAX(('Transactions(SG)'!$C$2:$C$24=A2)*ROW('Transactions(SG)'!$C$2:$C$24)))-ROW('Transactions(SG)'!$J$2:$J$24)+1),"No Transactions")}
H2: {=IFERROR(INDEX('Transactions(SG)'!$O$2:$O$24,SUMPRODUCT(MAX(('Transactions(SG)'!$C$2:$C$24=A2)*ROW('Transactions(SG)'!$C$2:$C$24)))-ROW('Transactions(SG)'!$O$2:$O$24)+1),"No Transactions")}
Please see attached file for additional reference. You may need to change the "No Transactions" portion of the formula to 0 to avoid error messages. This will happen if there is no transaction associated with the symbol.
Could you explain the
1/(A2='Transactions(SG)'!$C$2:$C$24)*'Transactions(SG)'!$A$2:$A$24 part of the formula? )
This is used to extract the max transaction date for X company (Stock Summary(SG)!A2). It looks at all of the values that match x company along side with the date and then returns the max date of this subset from the transactions worksheet. Which is then used in the Index / Match portion of the formula.