=SUMIF(A1:A7,"Bush",D1:D7) returns 12 years of Bush presidency.
Can I add the search "Kennedy" to this single formula?
But: Please do not as shown above! A2:A3 should always be outside of A1:D7. Why? Imagine using A2:A6: "Bush" would be calculated as 2*(4+8), not as (4+8), because it is listed twice - and would be SUMIF'd twice!
COUNTIF can be used in this manner as well (without ,D1:D7).