I want to add only the numbers in A1:A25 if the row that they are on has a certain value in an adjacent cell. For Example if row 1,3,4,7,8,20 all have the word "Yes" in column B I would like to add the values in A1,3,4,7,8,20.

Thank you for your help.