Comparison Operators in formulas

S

Steve P

Hi,
I have written an array formula that evaluates 2 criteria before
counting...here it is
{=COUNT(IF(INDIRECT(B5&"!$D$2:$D$500")="CURRENT",IF(INDIRECT(B5&"!$E$2:$E$500")="1",INDIRECT(B5&"!$C$2:$C$500"))))}

The above forumla works perfectly.

I'm trying to use the same formula to count the same data with slightly
different criteria. On the new formula, I'd like to substitute the "CURRENT"
criteria with a number range...ie: 1=>x<=30.

What syntax should I use?
 
S

smartin

Steve said:
Hi,
I have written an array formula that evaluates 2 criteria before
counting...here it is:
{=COUNT(IF(INDIRECT(B5&"!$D$2:$D$500")="CURRENT",IF(INDIRECT(B5&"!$E$2:$E$500")="1",INDIRECT(B5&"!$C$2:$C$500"))))}

The above forumla works perfectly.

I'm trying to use the same formula to count the same data with slightly
different criteria. On the new formula, I'd like to substitute the "CURRENT"
criteria with a number range...ie: 1=>x<=30.

What syntax should I use?

I rather think you meant something like

1 <= x <= 30

So, "between" syntax; One way:

AND(x>=1,x<=30)

Now, you've written '="CURRENT"' and '="1"' as if you are doing text
comparisons. How does that fit in with a number range?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top