Solved

counting occurances relative to another column

Posted on 2011-10-30
162 Views
Hi,

I have 2 columns of data next to each other, and they are lined up so i have column A which is decimal number and column b has a key word in it (either "good" or "bad")

I want to find whether the number in column A is between 0.5 and 1, also whether the keyword in the other column is "bad"

So far i have this to find the numbers beween a certain range:

=COUNT(A:A)-COUNTIF(A:A,"<0.5")-COUNTIF(A:A,">1")

But im not sure how to find if the keyword in the second column is equal to "bad"
0
Question by:jayfletcher
1 Comment

LVL 50

Accepted Solution

Try SUMPRODUCT, i.e.

In Excel 2003 and earlier you can't use whole columns in SUMPRODUCT so I restricted the range - change as required.

In Excel 2007 and later you can use COUNTIFS (with an "S"), i.e.

regards, barry
0

Featured Post

Suggested Solutions

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.