I have a data problem wherein I need to sum two rows and paste the values in a third new row. Here is my sample dataset:

And this is the Output that I need:
That is if the value of A is "y" or "Z", I want to add them and store the values in the row where A is "T"
I tried using multirow formula but I was only able to do this for one column at a time. This is difficult as in the original dataset there are over 40 columns and this kind of summing is required multiple times.
Any help will be appreciated!