Do sum of cells having specific code in front be done

Hello,
I am Dr Kunvar Harsh from India
I wanted to know if there is any way I can put formula to sum all those items with code e.g E C, H C, K C, KH C (where C stands for-COMMON account) separately from the whole list of item codes having various codes like E H, E K, K H, K K etc..
Thank you