I am trying to use sumif to divide by a range and keep getting an error message. Basically, i have a row of data in cell "I" and categories listed down row "C". I am trying to create a formula at the bottom of the spreadsheet that says, "for all the rows in the top of the sheet where the word in column C matches the word in column C on this row, divide X by the total".

the problem seems to have to do with dividing by a range. Here is what i am trying to use:

=SUMIF($C$12:$C$25,$C36,(I36/(I12:I25)))

Excel keeps telling me there is an error with the formula. Can someone tell me what i'm doing wrong?