Thread: conditional sum
View Single Post
  #2   Report Post  
Kevin@Radstock Kevin@Radstock is offline
Member
 
Posts: 93
Default

Hi smithy4564

Hope I am on the right track!
Assuming the data you posted is in cells A1:D6.
=SUMPRODUCT((A1:A6="A")*(B1:D60)) change "A" to "B" or put them in cell that you can reference to. (May be Data Validation).

Quote:
Originally Posted by smithy4564 View Post
Hi,

I'm trying to count the number of 1s and 0s in certain rows.

e.g.

A 1 0 1
B 0
A 1
A
B 1 0
B 1 1



The 1s are outstanding observations and 0s are resolved observations. This obviously means by counting the number of 1s we know how many observations are outstanding.

However we are coming to an end of year audit and want to count how many observations were raised in total for each company(where A and B are company names and each row represents a location in that company).

I'm trying to get a 'concise' formula which will add all the 1s and 0s in a row depending on if it is company A or B. I've tried playing around with arrays and haven't had much luck.

Any help appreciated!

Cheers,

Dan