You can use this formula in H5 for the first metal (Platinum):

=SUMIFS('Tab B - Historial Pricing'!C$4:C$39,'Tab B - Historial Pricing'!$B$4:$B$39,EOMONTH($C5,-1)+1)

Copy/Paste this into J5 and L5 for the other metals, then copy all 3 formulae down as far as required.

Hope this helps.

Pete