Zend certified PHP/Magento developer

Adding Values of a specific label/tag in a spreadsheet

I am designing a spreadsheet for an accounting framework where I record all the transactions. Say there are 3 categories of transactions: A, B, C.
I want to record the transaction, label my transaction, and get a sum of the labels.

Is there any function, perhaps a dropdown feature, where I could just record the transaction, label it, and the result updates?

Maybe something like in the picture…

enter image description here