Philip has attended:
Excel Intermediate course
IF Function
Hi, I'm trying to create a formula that adds up certain numbers in a column depending upon what is in another column.
i.e. If Column 'C' has a 'yes' in it then add the values in column 'D'
Thanks
Phil
RE: IF Function
Hi Philip,
Thank you for your question and welcome to the forum.
Do you mean look for a Value of Yes in Column C and then add sum the corresponding value in Column D?
If so you can use the SUMIF function. The formula would be as follows:
=SUMIF(C1:c18,"Yes",D1:D18)
This formula has 3 arguments:
sumif(Range,Criteria,SumRange)
In your example the range argument woud be the range of cells in column C presumably listing Yes or No.
The Criteria in your case would be Yes in speech marks(") as we are looking to only add up the figures in column D that have Yes alongside them in Column C.
The Sum Range is the range of cells you want to sum where the criteria is met. i.e. sum all of the column D figures that have a Yes alongside.
I have attached an example spreadsheet.
I hope this answers your question.
Regards
Simon