formula for selecting value if matches criteria.

New Contributor

I have a spreadsheet where the value in column F is the criteria (Yes) in order to include value in column H to create a total cost at end. Is there a formula to do this. Again I'm not all that excel savvy and hope you experts in the community can help me out, my apologies if it's such an easy one. 

Screenshot (5).png

 Thanks in advance, Claire

4 Replies
best response confirmed by Peter Bartholomew (Trusted Contributor)


You can use SUMIF for this:


=SUMIF(F4:F13, "Yes", H4:H13)


Adjust the ranges if necessary.


Using names created from your headings,

= SUMIFS(Cost, Yes_No, "Yes")


@Hans Vogelaar - THANK YOU ! :-), it worked - many thanks for speedy reply. Thanks once again 

Thank you Peter, it didn't quite work but I can see the potential of using this in another sheet. Thanks once again