ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sum of values in row if they also correspond to a month? (https://www.excelbanter.com/excel-discussion-misc-queries/186809-sum-values-row-if-they-also-correspond-month.html)

ceri_m[_2_]

Sum of values in row if they also correspond to a month?
 
Hi, For each product I have the date it was checked, and a value for if there
are any imperfections, I want a formula that works out how many products
there were with imperfections in any month. Products with any imperfections
have a 1 in that box, each colum represents a product checked.

Month May May May June
Product has imperfection? 1 1 0 1

So I want my formula to return that May has 2 wrong products, June has 1...
I thought it was going to be a simple countif, but i've tried =COUNTIF(B2:E2,
B1:E1="May") and it's just returning a blank! Please help!! I've tried so
many variations of formulas and not getting anywhere!
Thanks
Ceri


Pete_UK

Sum of values in row if they also correspond to a month?
 
Try it this way:

=SUMIF(B$1:E$1,"May",B2:E2)

Hope this helps.

Pete

On May 9, 9:13*am, ceri_m wrote:
Hi, For each product I have the date it was checked, and a value for if there
are any imperfections, I want a formula that works out how many products
there were with imperfections in any month. Products with any imperfections
have a 1 in that box, each colum represents a product checked.

Month * * * * * * * * * * * * * * * * * May * * May * * May * * June
Product has imperfection? * * * 1 * * * 1 * * * 0 * * * 1

So I want my formula to return that May has 2 wrong products, June has 1....
I thought it was going to be a simple countif, but i've tried =COUNTIF(B2:E2,
B1:E1="May") and it's just returning a blank! Please help!! I've tried so
many variations of formulas and not getting anywhere!
Thanks
Ceri




All times are GMT +1. The time now is 12:03 AM.

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