if function
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel Training and help » IF Function

IF Function

resolvedResolved · Low Priority · Version 2007

replyReply Fri 9 Dec 2011, 13:48Delegate Philip said...

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

For upcoming training course dates see: Pricing & availability

replyReply Fri 9 Dec 2011, 16:30Trainer Simon said...

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.

 

Please browse our web site to find out more about
vba for excel training and other Microsoft training courses.

Excel tip:

Missing Field handle

If your field handle goes missing all you need to do is go to tools > options > edit tab and then make sure that the check boxes for paste and insert buttons are checked.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard