I have a spreadsheet containing a sum if

i want to test TWO conditions on the sum if

if there is a simple way to do this?

IE. if one column contains "Yes" and another column contains a specified name "Mary" then add up mary's test scores which are located in another column

help??