SOLVED

New Contributor

# Last Dividend Transaction

Hi Guys, hope to get some help around here.

I am trying to return the last Div transaction from the worksheet Transactions to HoldingsDB.

A                              B              C                                                                            E

 2022-05-12 Div APPLE INC. (XNAS:AAPL) 0.23 2022-06-13 Buy APPLE INC. (XNAS:AAPL) 133.8 2022-08-11 Div APPLE INC. (XNAS:AAPL) 0.23

The formula should be based on criterias: Type Div (B) and Stock (C)

Return (0.23) to J5 on worksheet HoldingsDB

A                                                                                          B              J

 APPLE INC. (XNAS:AAPL) AAPL -

Thank you for your support.

4 Replies

# Re: Last Dividend Transaction

``=INDEX('Transactions to HoldingsDB'!\$D\$1:\$D\$3,MATCH(LARGE(IF('Transactions to HoldingsDB'!\$C\$1:\$C\$3=HoldingsDB!A5,'Transactions to HoldingsDB'!\$A\$1:\$A\$3),1),'Transactions to HoldingsDB'!\$A\$1:\$A\$3,0))``

You can try this formula. Enter the formula with ctrl+shift+enter if you don't work with Office365 or 2021.

worksheet HoldingsDB:

worksheet Transactions to HoldingsDB:

# Re: Last Dividend Transaction

Hi! Thank you very much for your help. The formula almost worked.
The only thing missing is the Type criteria, some of the stock is return the last Buy value.
best response confirmed by rafaelcilios (New Contributor)
Solution

# Re: Last Dividend Transaction

You are welcome. Sorry the first formula was missing the "Div" condition.

``=INDEX('Transactions to HoldingsDB'!\$D\$1:\$D\$3,MATCH(LARGE(IF(('Transactions to HoldingsDB'!\$C\$1:\$C\$3=HoldingsDB!A5)*('Transactions to HoldingsDB'!\$B\$1:\$B\$3="Div"),'Transactions to HoldingsDB'!\$A\$1:\$A\$3),1),'Transactions to HoldingsDB'!\$A\$1:\$A\$3,0))``

You can try this formula which takes into account the Type criteria "Div".

# Re: Last Dividend Transaction

That worked perfectly, thank you for your help!

Cheers!