The BUY and SELL area is done and ordered by date descending, but I need help to calculate the profit of each article.
What I need is to have the PROFIT Area filled like in the example.
My idea is doing it with a VLOOKUP, but I need it to use only one Transaction ID each time (one for BUY, other from SELL).
EDIT: I want all the BUY Transaction ID on "Column I" and the nearest SELL Transaction ID on his side on "Column J". If there's isn't a SELL Transaction, put only the BUY Transaction ID and leave the SELL Transaction ID in BLANK.
I hope I made myself clear.
Thanks in advance!