I have two tables with a one to many relationship

Table A

Agent ID Agent Name Commission Date Total commission


Table B

Commission Date Agent ID Commission


Currently I have an array formula in the Total commission column (table A)

That sums all commission when the agent ID and commission date in table B
match the agent ID and commission date from table A

When I make updates to the spreadsheet it runs very slow.

Is there away to accomplish this task with VB?

Thanks for any help