I don't know how to tell the subtotal command to look at every cell in column A for an "R" and sum the associated value in column B. If I use a condition with the subtotal it only looks at one cell:
=IF(A12="R",(SUBTOTAL(9,B12:B45623)),0)
How do I give it a range condition?