Struggling with a formula

I have a spreadsheet in Calc for tracking our medical expenses. Col. D is text with my or my wife’s initials. column C is the amount. need help to create formula for each of our totals by sorting on initials in D

=SUMIF(D2:D13,“MT”,C2:C13)

Change “MT” to the initials for sum.