Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

if function

ResolvedVersion 2007

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

Attached files...

SUMIF example.xls

Thu 15 Dec 2011: Automatically marked as resolved.

Excel tip:

Deleting cells, Rows & columns

place your cursor on a cell, row number or column letter and use CTRL + -.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.