And why not a nice and easy Pivot Table instead of complicated formulas??
Your data as the perfect layout
First delete row 1700 containing unneeded text
Remove the existing filter
Select your range and create an Excel Table
Use dates as row labels and group as required ( Months and years)
Use vehicles as column labels
And the Debit Amount as Values
You are now all set to explore the wonderful world of Pivot tables
( as the range is now an Excel Table, you can add or delete rows, the PT will adapt after refreshing
Attachments
Copy of Vehicle Report Consollidate for excel.xlsx