ERLANDSEN DATA CONSULTING Excel & VBA Tips   Informasjon på norsk / Information in Norwegian

These pages are no longer updated and are only available for archive purposes.

Click here to visit the pages with updated information.

Conditional sum

With the worksheetfunction SUMIF() it's possible to return the sum of all cells in a given range that fulfils a given criteria.

The function =SUMIF(A1:A100,">1000") will return the sum of all values in the range A1:A100 that is greater than 1000.

The function =SUMIF(A1:A100,">1000",B1:B100) will return the sum of all values in the range B1:B100 that has an adjacent cell in the range A1:A100 that is greater than 1000.

You can also use the COUNTIF()-function in a similar way to perform a conditional count.

 

Document last updated 1999-08-14 12:44:13      Printerfriendly version

 

Erlandsen Data Consulting     http://www.erlandsendata.no/   
Excel & VBA Tips   Copyright ©1999-2024    Ole P. Erlandsen   All rights reserved
E-mail Contact Address