A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
The formula you're using there is an array formula which needs to be committed with Ctrl+Shift+Enter.
Why not just use SUMIF instead:
=SUMIF(G5:G6,A19,H5:H6)
comitted normally with Enter.
Hope that helps.
Cheers
Rich