PC Review


Reply
Thread Tools Rate Thread

Combining COUNTIF and AND functions

 
 
KA
Guest
Posts: n/a
 
      27th Nov 2008
Hello,
I want a row counted only if the row contains the letters "AA" in one cell
and does not contain the letters "NOT REQ'D" in another cell of the same row.

The COUNTIF statement works fine. =COUNTIF(A4:A1000,"AA")

However, I tried adding the AND statement but can't get it to work.

Would someone be able to help please?
Merci,
KA


 
Reply With Quote
 
 
 
 
T. Valko
Guest
Posts: n/a
 
      27th Nov 2008
Try this:

=SUMPRODUCT(--(A4:A1000="AA"),--(B4:B1000<>"NOT REQ'D"))

--
Biff
Microsoft Excel MVP


"KA" <(E-Mail Removed)> wrote in message
news:9B4E0C5E-0399-417F-B032-(E-Mail Removed)...
> Hello,
> I want a row counted only if the row contains the letters "AA" in one cell
> and does not contain the letters "NOT REQ'D" in another cell of the same
> row.
>
> The COUNTIF statement works fine. =COUNTIF(A4:A1000,"AA")
>
> However, I tried adding the AND statement but can't get it to work.
>
> Would someone be able to help please?
> Merci,
> KA
>
>



 
Reply With Quote
 
KA
Guest
Posts: n/a
 
      27th Nov 2008
Biff,

When I entered your formula it doesn't generate an error message, but it
still only counts the total number of "AA" values.

Since the values I'm using are on another worksheet, and the results on
another, the formula I entered was:
=SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--(F4:F1000<>"NOT REQ'D"))

Would you have any other ideas?
Thanks,
KA

"T. Valko" wrote:
> Try this:
> =SUMPRODUCT(--(A4:A1000="AA"),--(B4:B1000<>"NOT REQ'D"))
> Biff
> Microsoft Excel MVP
>
> > "KA" <(E-Mail Removed)> wrote in message

> news:9B4E0C5E-0399-417F-B032-(E-Mail Removed)...
> > Hello,
> > I want a row counted only if the row contains the letters "AA" in one cell
> > and does not contain the letters "NOT REQ'D" in another cell of the same
> > row.
> >
> > The COUNTIF statement works fine. =COUNTIF(A4:A1000,"AA")
> >
> > However, I tried adding the AND statement but can't get it to work.
> >
> > Would someone be able to help please?
> > Merci,
> > KA
> >
> >

>
>
>

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      27th Nov 2008
Are you saying that it counts rows where A= "AA" and F= "NOT REQ'D" ?

If that's the case then there's a "problem" with the data in column F. Is
"NOT REQ'D" the only entry in the cell or is it part of what can be in a
cell? In other words, is "NOT REQ'D" a substring of a larger string?

Common problems with data include unseen leading/trailing spaces. Like this:

<space>NOT REQ'D
NOT REQ'D<space>
<space>NOT REQ'D<space>

--
Biff
Microsoft Excel MVP


"KA" <(E-Mail Removed)> wrote in message
news:C1872D5C-2045-4A39-BCF7-(E-Mail Removed)...
> Biff,
>
> When I entered your formula it doesn't generate an error message, but it
> still only counts the total number of "AA" values.
>
> Since the values I'm using are on another worksheet, and the results on
> another, the formula I entered was:
> =SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--(F4:F1000<>"NOT
> REQ'D"))
>
> Would you have any other ideas?
> Thanks,
> KA
>
> "T. Valko" wrote:
>> Try this:
>> =SUMPRODUCT(--(A4:A1000="AA"),--(B4:B1000<>"NOT REQ'D"))
>> Biff
>> Microsoft Excel MVP
>>
>> > "KA" <(E-Mail Removed)> wrote in message

>> news:9B4E0C5E-0399-417F-B032-(E-Mail Removed)...
>> > Hello,
>> > I want a row counted only if the row contains the letters "AA" in one
>> > cell
>> > and does not contain the letters "NOT REQ'D" in another cell of the
>> > same
>> > row.
>> >
>> > The COUNTIF statement works fine. =COUNTIF(A4:A1000,"AA")
>> >
>> > However, I tried adding the AND statement but can't get it to work.
>> >
>> > Would someone be able to help please?
>> > Merci,
>> > KA
>> >
>> >

>>
>>
>>



 
Reply With Quote
 
KA
Guest
Posts: n/a
 
      28th Nov 2008
Yes, it counts rows where A= "AA" and F= "NOT REQ'D".
I checked the "NOT REQ'D" value, in the data list, and it does not have
leading or following spaces.

Is there any other way of writing the statement?

KA

"T. Valko" wrote:

> Are you saying that it counts rows where A= "AA" and F= "NOT REQ'D" ?
>
> If that's the case then there's a "problem" with the data in column F. Is
> "NOT REQ'D" the only entry in the cell or is it part of what can be in a
> cell? In other words, is "NOT REQ'D" a substring of a larger string?
>
> Common problems with data include unseen leading/trailing spaces. Like this:
>
> <space>NOT REQ'D
> NOT REQ'D<space>
> <space>NOT REQ'D<space>
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "KA" <(E-Mail Removed)> wrote in message
> news:C1872D5C-2045-4A39-BCF7-(E-Mail Removed)...
> > Biff,
> >
> > When I entered your formula it doesn't generate an error message, but it
> > still only counts the total number of "AA" values.
> >
> > Since the values I'm using are on another worksheet, and the results on
> > another, the formula I entered was:
> > =SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--(F4:F1000<>"NOT
> > REQ'D"))
> >
> > Would you have any other ideas?
> > Thanks,
> > KA
> >
> > "T. Valko" wrote:
> >> Try this:
> >> =SUMPRODUCT(--(A4:A1000="AA"),--(B4:B1000<>"NOT REQ'D"))
> >> Biff
> >> Microsoft Excel MVP
> >>
> >> > "KA" <(E-Mail Removed)> wrote in message
> >> news:9B4E0C5E-0399-417F-B032-(E-Mail Removed)...
> >> > Hello,
> >> > I want a row counted only if the row contains the letters "AA" in one
> >> > cell
> >> > and does not contain the letters "NOT REQ'D" in another cell of the
> >> > same
> >> > row.
> >> >
> >> > The COUNTIF statement works fine. =COUNTIF(A4:A1000,"AA")
> >> >
> >> > However, I tried adding the AND statement but can't get it to work.
> >> >
> >> > Would someone be able to help please?
> >> > Merci,
> >> > KA
> >> >
> >> >
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      28th Nov 2008
>=SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--(F4:F1000<>"NOT
>REQ'D"))
>Yes, it counts rows where A= "AA" and F= "NOT REQ'D".


Hmmm....

Are these ranges on 2 different sheets?

Try this:

=SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--(ISERROR(SEARCH("NOT
REQ'D",F4:F1000))))

--
Biff
Microsoft Excel MVP


"KA" <(E-Mail Removed)> wrote in message
news:40DFC7EC-A04E-4F44-AA59-(E-Mail Removed)...
> Yes, it counts rows where A= "AA" and F= "NOT REQ'D".
> I checked the "NOT REQ'D" value, in the data list, and it does not have
> leading or following spaces.
>
> Is there any other way of writing the statement?
>
> KA
>
> "T. Valko" wrote:
>
>> Are you saying that it counts rows where A= "AA" and F= "NOT REQ'D" ?
>>
>> If that's the case then there's a "problem" with the data in column F. Is
>> "NOT REQ'D" the only entry in the cell or is it part of what can be in a
>> cell? In other words, is "NOT REQ'D" a substring of a larger string?
>>
>> Common problems with data include unseen leading/trailing spaces. Like
>> this:
>>
>> <space>NOT REQ'D
>> NOT REQ'D<space>
>> <space>NOT REQ'D<space>
>>
>> --
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "KA" <(E-Mail Removed)> wrote in message
>> news:C1872D5C-2045-4A39-BCF7-(E-Mail Removed)...
>> > Biff,
>> >
>> > When I entered your formula it doesn't generate an error message, but
>> > it
>> > still only counts the total number of "AA" values.
>> >
>> > Since the values I'm using are on another worksheet, and the results on
>> > another, the formula I entered was:
>> > =SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--(F4:F1000<>"NOT
>> > REQ'D"))
>> >
>> > Would you have any other ideas?
>> > Thanks,
>> > KA
>> >
>> > "T. Valko" wrote:
>> >> Try this:
>> >> =SUMPRODUCT(--(A4:A1000="AA"),--(B4:B1000<>"NOT REQ'D"))
>> >> Biff
>> >> Microsoft Excel MVP
>> >>
>> >> > "KA" <(E-Mail Removed)> wrote in message
>> >> news:9B4E0C5E-0399-417F-B032-(E-Mail Removed)...
>> >> > Hello,
>> >> > I want a row counted only if the row contains the letters "AA" in
>> >> > one
>> >> > cell
>> >> > and does not contain the letters "NOT REQ'D" in another cell of the
>> >> > same
>> >> > row.
>> >> >
>> >> > The COUNTIF statement works fine. =COUNTIF(A4:A1000,"AA")
>> >> >
>> >> > However, I tried adding the AND statement but can't get it to work.
>> >> >
>> >> > Would someone be able to help please?
>> >> > Merci,
>> >> > KA
>> >> >
>> >> >
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
KA
Guest
Posts: n/a
 
      28th Nov 2008
No. The ranges of values are on the same worksheet. The data lists are on
another worksheet.

I tried the latest formula that you posted and it still counts rows where A=
"AA" and F= "NOT REQ'D".

A bit of a mystery, what?

"T. Valko" wrote:

> >=SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--(F4:F1000<>"NOT
> >REQ'D"))
> >Yes, it counts rows where A= "AA" and F= "NOT REQ'D".

>
> Hmmm....
> Are these ranges on 2 different sheets?
> > Try this:
> > =SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--(ISERROR(SEARCH("NOT

> REQ'D",F4:F1000))))
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "KA" <(E-Mail Removed)> wrote in message
> news:40DFC7EC-A04E-4F44-AA59-(E-Mail Removed)...
> > Yes, it counts rows where A= "AA" and F= "NOT REQ'D".
> > I checked the "NOT REQ'D" value, in the data list, and it does not have
> > leading or following spaces.
> >
> > Is there any other way of writing the statement?
> >
> > KA
> >
> > "T. Valko" wrote:
> >
> >> Are you saying that it counts rows where A= "AA" and F= "NOT REQ'D" ?
> >>
> >> If that's the case then there's a "problem" with the data in column F. Is
> >> "NOT REQ'D" the only entry in the cell or is it part of what can be in a
> >> cell? In other words, is "NOT REQ'D" a substring of a larger string?
> >>
> >> Common problems with data include unseen leading/trailing spaces. Like
> >> this:
> >>
> >> <space>NOT REQ'D
> >> NOT REQ'D<space>
> >> <space>NOT REQ'D<space>
> >>
> >> --
> >> Biff
> >> Microsoft Excel MVP
> >>
> >>
> >> "KA" <(E-Mail Removed)> wrote in message
> >> news:C1872D5C-2045-4A39-BCF7-(E-Mail Removed)...
> >> > Biff,
> >> >
> >> > When I entered your formula it doesn't generate an error message, but
> >> > it
> >> > still only counts the total number of "AA" values.
> >> >
> >> > Since the values I'm using are on another worksheet, and the results on
> >> > another, the formula I entered was:
> >> > =SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--(F4:F1000<>"NOT
> >> > REQ'D"))
> >> >
> >> > Would you have any other ideas?
> >> > Thanks,
> >> > KA
> >> >
> >> > "T. Valko" wrote:
> >> >> Try this:
> >> >> =SUMPRODUCT(--(A4:A1000="AA"),--(B4:B1000<>"NOT REQ'D"))
> >> >> Biff
> >> >> Microsoft Excel MVP
> >> >>
> >> >> > "KA" <(E-Mail Removed)> wrote in message
> >> >> news:9B4E0C5E-0399-417F-B032-(E-Mail Removed)...
> >> >> > Hello,
> >> >> > I want a row counted only if the row contains the letters "AA" in
> >> >> > one
> >> >> > cell
> >> >> > and does not contain the letters "NOT REQ'D" in another cell of the
> >> >> > same
> >> >> > row.
> >> >> >
> >> >> > The COUNTIF statement works fine. =COUNTIF(A4:A1000,"AA")
> >> >> >
> >> >> > However, I tried adding the AND statement but can't get it to work.
> >> >> >
> >> >> > Would someone be able to help please?
> >> >> > Merci,
> >> >> > KA
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      28th Nov 2008
Well, this is your problem:

>The ranges of values are on the same worksheet.
>The data lists are on another worksheet.


The formula you posted is testing 2 different sheets:

'WIs - All Modules'!A4:A1000="AA"

And

F4:F1000<>"NOT REQ'D"

Maybe we need this:

=SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--('WIs - All
Modules'!F4:F1000<>"NOT REQ'D"))

--
Biff
Microsoft Excel MVP


"KA" <(E-Mail Removed)> wrote in message
news:485D7C7F-2745-45E4-9A5B-(E-Mail Removed)...
> No. The ranges of values are on the same worksheet. The data lists are on
> another worksheet.
>
> I tried the latest formula that you posted and it still counts rows where
> A=
> "AA" and F= "NOT REQ'D".
>
> A bit of a mystery, what?
>
> "T. Valko" wrote:
>
>> >=SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--(F4:F1000<>"NOT
>> >REQ'D"))
>> >Yes, it counts rows where A= "AA" and F= "NOT REQ'D".

>>
>> Hmmm....
>> Are these ranges on 2 different sheets?
>> > Try this:
>> > =SUMPRODUCT(--('WIs - All
>> > Modules'!A4:A1000="AA"),--(ISERROR(SEARCH("NOT

>> REQ'D",F4:F1000))))
>>
>> --
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "KA" <(E-Mail Removed)> wrote in message
>> news:40DFC7EC-A04E-4F44-AA59-(E-Mail Removed)...
>> > Yes, it counts rows where A= "AA" and F= "NOT REQ'D".
>> > I checked the "NOT REQ'D" value, in the data list, and it does not have
>> > leading or following spaces.
>> >
>> > Is there any other way of writing the statement?
>> >
>> > KA
>> >
>> > "T. Valko" wrote:
>> >
>> >> Are you saying that it counts rows where A= "AA" and F= "NOT REQ'D" ?
>> >>
>> >> If that's the case then there's a "problem" with the data in column F.
>> >> Is
>> >> "NOT REQ'D" the only entry in the cell or is it part of what can be in
>> >> a
>> >> cell? In other words, is "NOT REQ'D" a substring of a larger string?
>> >>
>> >> Common problems with data include unseen leading/trailing spaces. Like
>> >> this:
>> >>
>> >> <space>NOT REQ'D
>> >> NOT REQ'D<space>
>> >> <space>NOT REQ'D<space>
>> >>
>> >> --
>> >> Biff
>> >> Microsoft Excel MVP
>> >>
>> >>
>> >> "KA" <(E-Mail Removed)> wrote in message
>> >> news:C1872D5C-2045-4A39-BCF7-(E-Mail Removed)...
>> >> > Biff,
>> >> >
>> >> > When I entered your formula it doesn't generate an error message,
>> >> > but
>> >> > it
>> >> > still only counts the total number of "AA" values.
>> >> >
>> >> > Since the values I'm using are on another worksheet, and the results
>> >> > on
>> >> > another, the formula I entered was:
>> >> > =SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--(F4:F1000<>"NOT
>> >> > REQ'D"))
>> >> >
>> >> > Would you have any other ideas?
>> >> > Thanks,
>> >> > KA
>> >> >
>> >> > "T. Valko" wrote:
>> >> >> Try this:
>> >> >> =SUMPRODUCT(--(A4:A1000="AA"),--(B4:B1000<>"NOT REQ'D"))
>> >> >> Biff
>> >> >> Microsoft Excel MVP
>> >> >>
>> >> >> > "KA" <(E-Mail Removed)> wrote in message
>> >> >> news:9B4E0C5E-0399-417F-B032-(E-Mail Removed)...
>> >> >> > Hello,
>> >> >> > I want a row counted only if the row contains the letters "AA" in
>> >> >> > one
>> >> >> > cell
>> >> >> > and does not contain the letters "NOT REQ'D" in another cell of
>> >> >> > the
>> >> >> > same
>> >> >> > row.
>> >> >> >
>> >> >> > The COUNTIF statement works fine. =COUNTIF(A4:A1000,"AA")
>> >> >> >
>> >> >> > However, I tried adding the AND statement but can't get it to
>> >> >> > work.
>> >> >> >
>> >> >> > Would someone be able to help please?
>> >> >> > Merci,
>> >> >> > KA
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
KA
Guest
Posts: n/a
 
      1st Dec 2008
It is a beautiful thing. It works!

Thanks Biff : )

KA

"T. Valko" wrote:

> Well, this is your problem:
>
> >The ranges of values are on the same worksheet.
> >The data lists are on another worksheet.

>
> The formula you posted is testing 2 different sheets:
>
> 'WIs - All Modules'!A4:A1000="AA"
>
> And
>
> F4:F1000<>"NOT REQ'D"
>
> Maybe we need this:
>
> =SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--('WIs - All
> Modules'!F4:F1000<>"NOT REQ'D"))
>
> --
> Biff
> Microsoft Excel MVP
>
>
> "KA" <(E-Mail Removed)> wrote in message
> news:485D7C7F-2745-45E4-9A5B-(E-Mail Removed)...
> > No. The ranges of values are on the same worksheet. The data lists are on
> > another worksheet.
> >
> > I tried the latest formula that you posted and it still counts rows where
> > A=
> > "AA" and F= "NOT REQ'D".
> >
> > A bit of a mystery, what?
> >
> > "T. Valko" wrote:
> >
> >> >=SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--(F4:F1000<>"NOT
> >> >REQ'D"))
> >> >Yes, it counts rows where A= "AA" and F= "NOT REQ'D".
> >>
> >> Hmmm....
> >> Are these ranges on 2 different sheets?
> >> > Try this:
> >> > =SUMPRODUCT(--('WIs - All
> >> > Modules'!A4:A1000="AA"),--(ISERROR(SEARCH("NOT
> >> REQ'D",F4:F1000))))
> >>
> >> --
> >> Biff
> >> Microsoft Excel MVP
> >>
> >>
> >> "KA" <(E-Mail Removed)> wrote in message
> >> news:40DFC7EC-A04E-4F44-AA59-(E-Mail Removed)...
> >> > Yes, it counts rows where A= "AA" and F= "NOT REQ'D".
> >> > I checked the "NOT REQ'D" value, in the data list, and it does not have
> >> > leading or following spaces.
> >> >
> >> > Is there any other way of writing the statement?
> >> >
> >> > KA
> >> >
> >> > "T. Valko" wrote:
> >> >
> >> >> Are you saying that it counts rows where A= "AA" and F= "NOT REQ'D" ?
> >> >>
> >> >> If that's the case then there's a "problem" with the data in column F.
> >> >> Is
> >> >> "NOT REQ'D" the only entry in the cell or is it part of what can be in
> >> >> a
> >> >> cell? In other words, is "NOT REQ'D" a substring of a larger string?
> >> >>
> >> >> Common problems with data include unseen leading/trailing spaces. Like
> >> >> this:
> >> >>
> >> >> <space>NOT REQ'D
> >> >> NOT REQ'D<space>
> >> >> <space>NOT REQ'D<space>
> >> >>
> >> >> --
> >> >> Biff
> >> >> Microsoft Excel MVP
> >> >>
> >> >>
> >> >> "KA" <(E-Mail Removed)> wrote in message
> >> >> news:C1872D5C-2045-4A39-BCF7-(E-Mail Removed)...
> >> >> > Biff,
> >> >> >
> >> >> > When I entered your formula it doesn't generate an error message,
> >> >> > but
> >> >> > it
> >> >> > still only counts the total number of "AA" values.
> >> >> >
> >> >> > Since the values I'm using are on another worksheet, and the results
> >> >> > on
> >> >> > another, the formula I entered was:
> >> >> > =SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--(F4:F1000<>"NOT
> >> >> > REQ'D"))
> >> >> >
> >> >> > Would you have any other ideas?
> >> >> > Thanks,
> >> >> > KA
> >> >> >
> >> >> > "T. Valko" wrote:
> >> >> >> Try this:
> >> >> >> =SUMPRODUCT(--(A4:A1000="AA"),--(B4:B1000<>"NOT REQ'D"))
> >> >> >> Biff
> >> >> >> Microsoft Excel MVP
> >> >> >>
> >> >> >> > "KA" <(E-Mail Removed)> wrote in message
> >> >> >> news:9B4E0C5E-0399-417F-B032-(E-Mail Removed)...
> >> >> >> > Hello,
> >> >> >> > I want a row counted only if the row contains the letters "AA" in
> >> >> >> > one
> >> >> >> > cell
> >> >> >> > and does not contain the letters "NOT REQ'D" in another cell of
> >> >> >> > the
> >> >> >> > same
> >> >> >> > row.
> >> >> >> >
> >> >> >> > The COUNTIF statement works fine. =COUNTIF(A4:A1000,"AA")
> >> >> >> >
> >> >> >> > However, I tried adding the AND statement but can't get it to
> >> >> >> > work.
> >> >> >> >
> >> >> >> > Would someone be able to help please?
> >> >> >> > Merci,
> >> >> >> > KA
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      1st Dec 2008
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"KA" <(E-Mail Removed)> wrote in message
news:0B781EF6-F338-44FE-9272-(E-Mail Removed)...
> It is a beautiful thing. It works!
>
> Thanks Biff : )
>
> KA
>
> "T. Valko" wrote:
>
>> Well, this is your problem:
>>
>> >The ranges of values are on the same worksheet.
>> >The data lists are on another worksheet.

>>
>> The formula you posted is testing 2 different sheets:
>>
>> 'WIs - All Modules'!A4:A1000="AA"
>>
>> And
>>
>> F4:F1000<>"NOT REQ'D"
>>
>> Maybe we need this:
>>
>> =SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--('WIs - All
>> Modules'!F4:F1000<>"NOT REQ'D"))
>>
>> --
>> Biff
>> Microsoft Excel MVP
>>
>>
>> "KA" <(E-Mail Removed)> wrote in message
>> news:485D7C7F-2745-45E4-9A5B-(E-Mail Removed)...
>> > No. The ranges of values are on the same worksheet. The data lists are
>> > on
>> > another worksheet.
>> >
>> > I tried the latest formula that you posted and it still counts rows
>> > where
>> > A=
>> > "AA" and F= "NOT REQ'D".
>> >
>> > A bit of a mystery, what?
>> >
>> > "T. Valko" wrote:
>> >
>> >> >=SUMPRODUCT(--('WIs - All Modules'!A4:A1000="AA"),--(F4:F1000<>"NOT
>> >> >REQ'D"))
>> >> >Yes, it counts rows where A= "AA" and F= "NOT REQ'D".
>> >>
>> >> Hmmm....
>> >> Are these ranges on 2 different sheets?
>> >> > Try this:
>> >> > =SUMPRODUCT(--('WIs - All
>> >> > Modules'!A4:A1000="AA"),--(ISERROR(SEARCH("NOT
>> >> REQ'D",F4:F1000))))
>> >>
>> >> --
>> >> Biff
>> >> Microsoft Excel MVP
>> >>
>> >>
>> >> "KA" <(E-Mail Removed)> wrote in message
>> >> news:40DFC7EC-A04E-4F44-AA59-(E-Mail Removed)...
>> >> > Yes, it counts rows where A= "AA" and F= "NOT REQ'D".
>> >> > I checked the "NOT REQ'D" value, in the data list, and it does not
>> >> > have
>> >> > leading or following spaces.
>> >> >
>> >> > Is there any other way of writing the statement?
>> >> >
>> >> > KA
>> >> >
>> >> > "T. Valko" wrote:
>> >> >
>> >> >> Are you saying that it counts rows where A= "AA" and F= "NOT REQ'D"
>> >> >> ?
>> >> >>
>> >> >> If that's the case then there's a "problem" with the data in column
>> >> >> F.
>> >> >> Is
>> >> >> "NOT REQ'D" the only entry in the cell or is it part of what can be
>> >> >> in
>> >> >> a
>> >> >> cell? In other words, is "NOT REQ'D" a substring of a larger
>> >> >> string?
>> >> >>
>> >> >> Common problems with data include unseen leading/trailing spaces.
>> >> >> Like
>> >> >> this:
>> >> >>
>> >> >> <space>NOT REQ'D
>> >> >> NOT REQ'D<space>
>> >> >> <space>NOT REQ'D<space>
>> >> >>
>> >> >> --
>> >> >> Biff
>> >> >> Microsoft Excel MVP
>> >> >>
>> >> >>
>> >> >> "KA" <(E-Mail Removed)> wrote in message
>> >> >> news:C1872D5C-2045-4A39-BCF7-(E-Mail Removed)...
>> >> >> > Biff,
>> >> >> >
>> >> >> > When I entered your formula it doesn't generate an error message,
>> >> >> > but
>> >> >> > it
>> >> >> > still only counts the total number of "AA" values.
>> >> >> >
>> >> >> > Since the values I'm using are on another worksheet, and the
>> >> >> > results
>> >> >> > on
>> >> >> > another, the formula I entered was:
>> >> >> > =SUMPRODUCT(--('WIs - All
>> >> >> > Modules'!A4:A1000="AA"),--(F4:F1000<>"NOT
>> >> >> > REQ'D"))
>> >> >> >
>> >> >> > Would you have any other ideas?
>> >> >> > Thanks,
>> >> >> > KA
>> >> >> >
>> >> >> > "T. Valko" wrote:
>> >> >> >> Try this:
>> >> >> >> =SUMPRODUCT(--(A4:A1000="AA"),--(B4:B1000<>"NOT REQ'D"))
>> >> >> >> Biff
>> >> >> >> Microsoft Excel MVP
>> >> >> >>
>> >> >> >> > "KA" <(E-Mail Removed)> wrote in message
>> >> >> >> news:9B4E0C5E-0399-417F-B032-(E-Mail Removed)...
>> >> >> >> > Hello,
>> >> >> >> > I want a row counted only if the row contains the letters "AA"
>> >> >> >> > in
>> >> >> >> > one
>> >> >> >> > cell
>> >> >> >> > and does not contain the letters "NOT REQ'D" in another cell
>> >> >> >> > of
>> >> >> >> > the
>> >> >> >> > same
>> >> >> >> > row.
>> >> >> >> >
>> >> >> >> > The COUNTIF statement works fine. =COUNTIF(A4:A1000,"AA")
>> >> >> >> >
>> >> >> >> > However, I tried adding the AND statement but can't get it to
>> >> >> >> > work.
>> >> >> >> >
>> >> >> >> > Would someone be able to help please?
>> >> >> >> > Merci,
>> >> >> >> > KA
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining Functions (Sumproduct and Countif) Richard Horn Microsoft Excel Worksheet Functions 5 16th Oct 2009 04:09 PM
combining COUNTIF and OR functions Josh Craig Microsoft Excel Worksheet Functions 3 29th Apr 2009 06:55 PM
Combining LOOKUP and COUNTIF functions =?Utf-8?B?a2F0ZV9zdXphbm5l?= Microsoft Excel Worksheet Functions 4 22nd Aug 2006 06:59 AM
Combining COUNTIF and AND functions david Microsoft Excel Worksheet Functions 16 7th Jul 2006 02:55 AM
combining countif and mid or right functions Charles Woll Microsoft Excel Discussion 5 10th Jul 2005 12:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:34 PM.