Please prepare your worksheet as per following steps. This me look like a long process but quite simple to understand.
1. Add a row at the top of data, and a column on left of your existing data.
2. Type 1,2,1,2,.... in freshly created column (leftmost), give it a lable e.g. code. similarly give labels to other 2 existing columns e.g. name and amount. in D column first row (D1), Type Code (label of first column) and in D2 type 1.
3. Now your worksheet should look like:
A B C D E
1 Code Name Amount Code
2 1 Bill 87 1
3 2 Susan 73
4 1 Alexis 26
5 2 Alexis 75
6 1 Kate 19
7 2 Bill 33
9 1 Susan 25
10 2 Kate 82
11
12 Total of alternates =DSUM(A1:C9,C1,D1:D2)
(key in above formula in C12, where you want to calculate total of rows with code 1)
And you have the result.
To calculate rows with code 2, simply change value in D2 to 2.
Happy learning

Sandeep K Tomar