Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Elliot Colbert
 
Posts: n/a
Default DCOUNTA Complex Criteria Question

I've got a workbook with two sheets - one is a list of names, and another is
a two-column array in which every name has multiple entries, and each entry
consists of the name and a percentage.

On the first sheet, I'm trying to create a tally next to each name of how
many of their entries have a percentage above or below a given number, using
the DCOUNTA function. In the past, when I would do this, I would create a
different set of criteria for each name. This works, but it takes forever,
becomes very hard to modify (if names need to be swapped in/out), and is just
generally unpleasant and unruly (each DCOUNTA function needs to be edited
individually to point to the right criteria, for example). I'd like to learn
how to accomplish this task with only one set of criteria, whereby the
DCOUNTA function (which is in the cell next to the name) can pull the name
from the field to the left (probably through the criteria).

I've tried putting all sorts of Lookup-type functions (HLOOKUP(), ROW())
into the criteria, but the main problem I can't get around is that they
always end up referring to the cell that the criteria is in, not the cell
(and thus the row) that the DCOUNTA function is in. Does anyone have any
bright ideas for a formula/criteria combo that would let me do what I want
with only one criteria set, and just drag the DCOUNTA formula straight down
the list of names.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default DCOUNTA Complex Criteria Question

Hi!

Use the Sumproduct function.

Sheet1 = names in column A
Sheet2 = names in column A, % in column B

Sheet1 A1 = John

=SUMPRODUCT(--(Sheet2!A1:A10=A1),--(Sheet2!B1:B10<=0.5))

That will count the number of entries where John had a % that was less than
or equal to 50.

If there might be empty cells in column B Sheet2 associated with a name
then:

=SUMPRODUCT(--(Sheet2!A1:A10=A1),--(ISNUMBER(Sheet!2B1:B10),--(Sheet2!B1:B10<=0.5))

I'd like to learn
how to accomplish this task with only one set of criteria, whereby the
DCOUNTA function (which is in the cell next to the name) can pull the name
from the field to the left (probably through the criteria).


"Pull" the name based on what criteria?

Biff

"Elliot Colbert" <Elliot wrote in message
...
I've got a workbook with two sheets - one is a list of names, and another
is
a two-column array in which every name has multiple entries, and each
entry
consists of the name and a percentage.

On the first sheet, I'm trying to create a tally next to each name of how
many of their entries have a percentage above or below a given number,
using
the DCOUNTA function. In the past, when I would do this, I would create a
different set of criteria for each name. This works, but it takes
forever,
becomes very hard to modify (if names need to be swapped in/out), and is
just
generally unpleasant and unruly (each DCOUNTA function needs to be edited
individually to point to the right criteria, for example). I'd like to
learn
how to accomplish this task with only one set of criteria, whereby the
DCOUNTA function (which is in the cell next to the name) can pull the name
from the field to the left (probably through the criteria).

I've tried putting all sorts of Lookup-type functions (HLOOKUP(), ROW())
into the criteria, but the main problem I can't get around is that they
always end up referring to the cell that the criteria is in, not the cell
(and thus the row) that the DCOUNTA function is in. Does anyone have any
bright ideas for a formula/criteria combo that would let me do what I want
with only one criteria set, and just drag the DCOUNTA formula straight
down
the list of names.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Elliot Colbert
 
Posts: n/a
Default DCOUNTA Complex Criteria Question

Biff, many thanks. Definitely the function I'm looking for.

However, I'm having a new problem. Many of the percentages in column B are
#DIV/0! errors, and I'm finding that even when I filter with the ISNUMBER
function, I'm getting a #DIV/0! for the SUMPRODUCT as well. I'll keep
looking for a fix myself, but if anyone's got the answer of the top of their
head, I'd love to hear it. Thanks again!

"Biff" wrote:

Hi!

Use the Sumproduct function.

Sheet1 = names in column A
Sheet2 = names in column A, % in column B

Sheet1 A1 = John

=SUMPRODUCT(--(Sheet2!A1:A10=A1),--(Sheet2!B1:B10<=0.5))

That will count the number of entries where John had a % that was less than
or equal to 50.

If there might be empty cells in column B Sheet2 associated with a name
then:

=SUMPRODUCT(--(Sheet2!A1:A10=A1),--(ISNUMBER(Sheet!2B1:B10),--(Sheet2!B1:B10<=0.5))

I'd like to learn
how to accomplish this task with only one set of criteria, whereby the
DCOUNTA function (which is in the cell next to the name) can pull the name
from the field to the left (probably through the criteria).


"Pull" the name based on what criteria?

Biff

"Elliot Colbert" <Elliot wrote in message
...
I've got a workbook with two sheets - one is a list of names, and another
is
a two-column array in which every name has multiple entries, and each
entry
consists of the name and a percentage.

On the first sheet, I'm trying to create a tally next to each name of how
many of their entries have a percentage above or below a given number,
using
the DCOUNTA function. In the past, when I would do this, I would create a
different set of criteria for each name. This works, but it takes
forever,
becomes very hard to modify (if names need to be swapped in/out), and is
just
generally unpleasant and unruly (each DCOUNTA function needs to be edited
individually to point to the right criteria, for example). I'd like to
learn
how to accomplish this task with only one set of criteria, whereby the
DCOUNTA function (which is in the cell next to the name) can pull the name
from the field to the left (probably through the criteria).

I've tried putting all sorts of Lookup-type functions (HLOOKUP(), ROW())
into the criteria, but the main problem I can't get around is that they
always end up referring to the cell that the criteria is in, not the cell
(and thus the row) that the DCOUNTA function is in. Does anyone have any
bright ideas for a formula/criteria combo that would let me do what I want
with only one criteria set, and just drag the DCOUNTA formula straight
down
the list of names.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Elliot Colbert
 
Posts: n/a
Default DCOUNTA Complex Criteria Question

Alright, I've gotten it to work by just doing a "=IF(L20,K2/L2,"")" (to keep
the cell blank if it will be a #DIV/0!). That said, if anyone knows a way to
make SUMPRODUCT work even in the presence of #DIV/0!'s, it might be useful
for future reference. Thanks.

"Elliot Colbert" wrote:

Biff, many thanks. Definitely the function I'm looking for.

However, I'm having a new problem. Many of the percentages in column B are
#DIV/0! errors, and I'm finding that even when I filter with the ISNUMBER
function, I'm getting a #DIV/0! for the SUMPRODUCT as well. I'll keep
looking for a fix myself, but if anyone's got the answer of the top of their
head, I'd love to hear it. Thanks again!

"Biff" wrote:

Hi!

Use the Sumproduct function.

Sheet1 = names in column A
Sheet2 = names in column A, % in column B

Sheet1 A1 = John

=SUMPRODUCT(--(Sheet2!A1:A10=A1),--(Sheet2!B1:B10<=0.5))

That will count the number of entries where John had a % that was less than
or equal to 50.

If there might be empty cells in column B Sheet2 associated with a name
then:

=SUMPRODUCT(--(Sheet2!A1:A10=A1),--(ISNUMBER(Sheet!2B1:B10),--(Sheet2!B1:B10<=0.5))

I'd like to learn
how to accomplish this task with only one set of criteria, whereby the
DCOUNTA function (which is in the cell next to the name) can pull the name
from the field to the left (probably through the criteria).


"Pull" the name based on what criteria?

Biff

"Elliot Colbert" <Elliot wrote in message
...
I've got a workbook with two sheets - one is a list of names, and another
is
a two-column array in which every name has multiple entries, and each
entry
consists of the name and a percentage.

On the first sheet, I'm trying to create a tally next to each name of how
many of their entries have a percentage above or below a given number,
using
the DCOUNTA function. In the past, when I would do this, I would create a
different set of criteria for each name. This works, but it takes
forever,
becomes very hard to modify (if names need to be swapped in/out), and is
just
generally unpleasant and unruly (each DCOUNTA function needs to be edited
individually to point to the right criteria, for example). I'd like to
learn
how to accomplish this task with only one set of criteria, whereby the
DCOUNTA function (which is in the cell next to the name) can pull the name
from the field to the left (probably through the criteria).

I've tried putting all sorts of Lookup-type functions (HLOOKUP(), ROW())
into the criteria, but the main problem I can't get around is that they
always end up referring to the cell that the criteria is in, not the cell
(and thus the row) that the DCOUNTA function is in. Does anyone have any
bright ideas for a formula/criteria combo that would let me do what I want
with only one criteria set, and just drag the DCOUNTA formula straight
down
the list of names.




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default DCOUNTA Complex Criteria Question

make SUMPRODUCT work even in the presence of #DIV/0!'s, it might be useful
for future reference.


It won't. The best solution is to fix the errors as you did.

Biff

"Elliot Colbert" wrote in message
...
Alright, I've gotten it to work by just doing a "=IF(L20,K2/L2,"")" (to
keep
the cell blank if it will be a #DIV/0!). That said, if anyone knows a way
to
make SUMPRODUCT work even in the presence of #DIV/0!'s, it might be useful
for future reference. Thanks.

"Elliot Colbert" wrote:

Biff, many thanks. Definitely the function I'm looking for.

However, I'm having a new problem. Many of the percentages in column B
are
#DIV/0! errors, and I'm finding that even when I filter with the ISNUMBER
function, I'm getting a #DIV/0! for the SUMPRODUCT as well. I'll keep
looking for a fix myself, but if anyone's got the answer of the top of
their
head, I'd love to hear it. Thanks again!

"Biff" wrote:

Hi!

Use the Sumproduct function.

Sheet1 = names in column A
Sheet2 = names in column A, % in column B

Sheet1 A1 = John

=SUMPRODUCT(--(Sheet2!A1:A10=A1),--(Sheet2!B1:B10<=0.5))

That will count the number of entries where John had a % that was less
than
or equal to 50.

If there might be empty cells in column B Sheet2 associated with a name
then:

=SUMPRODUCT(--(Sheet2!A1:A10=A1),--(ISNUMBER(Sheet!2B1:B10),--(Sheet2!B1:B10<=0.5))

I'd like to learn
how to accomplish this task with only one set of criteria, whereby
the
DCOUNTA function (which is in the cell next to the name) can pull the
name
from the field to the left (probably through the criteria).

"Pull" the name based on what criteria?

Biff

"Elliot Colbert" <Elliot wrote in
message
...
I've got a workbook with two sheets - one is a list of names, and
another
is
a two-column array in which every name has multiple entries, and each
entry
consists of the name and a percentage.

On the first sheet, I'm trying to create a tally next to each name of
how
many of their entries have a percentage above or below a given
number,
using
the DCOUNTA function. In the past, when I would do this, I would
create a
different set of criteria for each name. This works, but it takes
forever,
becomes very hard to modify (if names need to be swapped in/out), and
is
just
generally unpleasant and unruly (each DCOUNTA function needs to be
edited
individually to point to the right criteria, for example). I'd like
to
learn
how to accomplish this task with only one set of criteria, whereby
the
DCOUNTA function (which is in the cell next to the name) can pull the
name
from the field to the left (probably through the criteria).

I've tried putting all sorts of Lookup-type functions (HLOOKUP(),
ROW())
into the criteria, but the main problem I can't get around is that
they
always end up referring to the cell that the criteria is in, not the
cell
(and thus the row) that the DCOUNTA function is in. Does anyone have
any
bright ideas for a formula/criteria combo that would let me do what I
want
with only one criteria set, and just drag the DCOUNTA formula
straight
down
the list of names.







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Elliot Colbert
 
Posts: n/a
Default DCOUNTA Complex Criteria Question

Thanks for clearing that up - I should be good to go then!

"Biff" wrote:

make SUMPRODUCT work even in the presence of #DIV/0!'s, it might be useful
for future reference.


It won't. The best solution is to fix the errors as you did.

Biff

"Elliot Colbert" wrote in message
...
Alright, I've gotten it to work by just doing a "=IF(L20,K2/L2,"")" (to
keep
the cell blank if it will be a #DIV/0!). That said, if anyone knows a way
to
make SUMPRODUCT work even in the presence of #DIV/0!'s, it might be useful
for future reference. Thanks.

"Elliot Colbert" wrote:

Biff, many thanks. Definitely the function I'm looking for.

However, I'm having a new problem. Many of the percentages in column B
are
#DIV/0! errors, and I'm finding that even when I filter with the ISNUMBER
function, I'm getting a #DIV/0! for the SUMPRODUCT as well. I'll keep
looking for a fix myself, but if anyone's got the answer of the top of
their
head, I'd love to hear it. Thanks again!

"Biff" wrote:

Hi!

Use the Sumproduct function.

Sheet1 = names in column A
Sheet2 = names in column A, % in column B

Sheet1 A1 = John

=SUMPRODUCT(--(Sheet2!A1:A10=A1),--(Sheet2!B1:B10<=0.5))

That will count the number of entries where John had a % that was less
than
or equal to 50.

If there might be empty cells in column B Sheet2 associated with a name
then:

=SUMPRODUCT(--(Sheet2!A1:A10=A1),--(ISNUMBER(Sheet!2B1:B10),--(Sheet2!B1:B10<=0.5))

I'd like to learn
how to accomplish this task with only one set of criteria, whereby
the
DCOUNTA function (which is in the cell next to the name) can pull the
name
from the field to the left (probably through the criteria).

"Pull" the name based on what criteria?

Biff

"Elliot Colbert" <Elliot wrote in
message
...
I've got a workbook with two sheets - one is a list of names, and
another
is
a two-column array in which every name has multiple entries, and each
entry
consists of the name and a percentage.

On the first sheet, I'm trying to create a tally next to each name of
how
many of their entries have a percentage above or below a given
number,
using
the DCOUNTA function. In the past, when I would do this, I would
create a
different set of criteria for each name. This works, but it takes
forever,
becomes very hard to modify (if names need to be swapped in/out), and
is
just
generally unpleasant and unruly (each DCOUNTA function needs to be
edited
individually to point to the right criteria, for example). I'd like
to
learn
how to accomplish this task with only one set of criteria, whereby
the
DCOUNTA function (which is in the cell next to the name) can pull the
name
from the field to the left (probably through the criteria).

I've tried putting all sorts of Lookup-type functions (HLOOKUP(),
ROW())
into the criteria, but the main problem I can't get around is that
they
always end up referring to the cell that the criteria is in, not the
cell
(and thus the row) that the DCOUNTA function is in. Does anyone have
any
bright ideas for a formula/criteria combo that would let me do what I
want
with only one criteria set, and just drag the DCOUNTA formula
straight
down
the list of names.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Complex question about importing, analyzing data [email protected] Excel Discussion (Misc queries) 3 December 26th 05 12:55 AM
Returning Results Based on Two Criteria [email protected] Excel Worksheet Functions 7 October 23rd 05 02:53 PM
SumIf formula with complex criteria robot New Users to Excel 6 September 2nd 05 10:03 AM
Find largest alphanumeric value matching alpha criteria in databas Alison Excel Worksheet Functions 7 August 4th 05 06:59 PM
Jon Peltier - Pivot Table Result for yesterday's "Complex Chart" Question Barb Reinhardt Charts and Charting in Excel 3 December 8th 04 01:48 AM


All times are GMT +1. The time now is 02:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"