ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   sum the values of a range based upon multiple ranges and criteria (https://www.excelbanter.com/excel-worksheet-functions/99768-sum-values-range-based-upon-multiple-ranges-criteria.html)

LiveIt...

sum the values of a range based upon multiple ranges and criteria
 
Help!

Range("A2:A57") may contain values from "A-K"
Range("B2:B57") may contain values M, T, W, R, F for the days of the week.
Based on those ranges I need to sum Range("D2:D57") where both criterias are
met.
example:
Where Column A = "A" and where column B = "M", sum every cell ("D2:D57")
that meets both criteria, where column A may have 15 cells that contain "A"
and column B may have 5 cells that contain "M" leaving a maximum of 5 cells
that can be summed.

Thanks


SteveG

sum the values of a range based upon multiple ranges and criteria
 

LiveIt,

=SUMPRODUCT((A2:A57="A")*(B2:B57="M")*(D2:D57))

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=562213



All times are GMT +1. The time now is 07:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com