Good day,
I'm working on a spreadsheet to track the stocks I have purchased and sold and would like to create a formula to determine if a stock I buy would be allowed without triggering a wash sale. Basically my spreadsheet will look like this:
Where if I type in a stock ticker, for instance AAPL, it will tell me if I sold it at a loss in the past 30 days. In this case AAPL would be a wash sale. If I type in MSFT it would not be a wash sale since I sold it for a profit.
So I am trying to create a formula that looks at the current date and then looks in Column A and goes back 30 days then looks at the purchase price of the tickers and the sold price and determines if it was sold at a profit or at a loss in the past 30 days.
I'm not quite sure where to start on this formula. Any ideas?
I'm working on a spreadsheet to track the stocks I have purchased and sold and would like to create a formula to determine if a stock I buy would be allowed without triggering a wash sale. Basically my spreadsheet will look like this:
Date | Transaction | Symbol | Price |
12/1/2021 | Bought | MSFT | $320.00 |
12/1/2021 | Bought | ASO | $50.00 |
12/1/2021 | Sold | NVDA | $310.50 |
12/3/2021 | Bought | HIBB | $68.04 |
12/7/2021 | Bought | AAPL | $170.47 |
12/8/2021 | Bought | PL | $11.05 |
12/10/2021 | Sold | MSFT | $342.55 |
12/10/2021 | Sold | ASO | $44.43 |
12/15/2021 | Sold | AAPL | $160 |
Where if I type in a stock ticker, for instance AAPL, it will tell me if I sold it at a loss in the past 30 days. In this case AAPL would be a wash sale. If I type in MSFT it would not be a wash sale since I sold it for a profit.
So I am trying to create a formula that looks at the current date and then looks in Column A and goes back 30 days then looks at the purchase price of the tickers and the sold price and determines if it was sold at a profit or at a loss in the past 30 days.
I'm not quite sure where to start on this formula. Any ideas?