Zend certified PHP/Magento developer

Calculate monthly profit/loss from stock options positions

I recently switched from Google Sheets to Excel where I had this feature and I’ve spent several hours studying various methods but, for the life of me can’t figure out which formula would be best or how to write said formula in Excel.

I want to be able to calculate the amount of monthly income earned from specific options strategies in an Excel stock options portfolio spreadsheet onto a different sheet within the same workbook titled Monthly Income. For instance, one of the sheets in the workbook is titled Calls where I keep track of the Covered Calls I sell against stock positions. Within that sheet column AE is titled Month Closed where I document when a position is closed and the following column AF is titled Actual Profit / Loss where the profit or loss of each position is calculated.

During any given month there can be anywhere from no transactions, to several so these need to be tallied up in they meet criteria for that month. So, the columns in the Monthly Income sheet carry the titles of Income Type, Amount and the numerical year such as 2023. Thanks in advance.

Monthly Income sheet