I have this array formula for 5000 rows and it runs very slow. Any possible solution in order to make it run faster. It’s only $A9 that changes as you copy it down the line. Any help would be appreciated.

=SUM(IF(('Report'!$J$4:$GP$4=$A9)*('Report'!$B$7:$B$5000=B$3),'Report'!$J$7:$GP$5000))