ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   "DCOUNTA-ING" too many items... (https://www.excelbanter.com/excel-worksheet-functions/238356-dcounta-ing-too-many-items.html)

dh13134

"DCOUNTA-ING" too many items...
 
i have several industry group names in a column - general example:
A5 thru A10 contain "Electronics" (5 total)
A10 thru A15 contains "Electronics Semiconductors" (5 total)
A15 thru A20 contains "Electronics Equipment" (5 total)

when i use the DCOUNTA function with "Electronics" as my criteria, the
result gives me 15 "answers", when i only want 5 - "Electronics". i'm getting
everything that even "contains" "Electronics" instead of only the 5 that i
want.
any thoughts would be appreciated.

i'm using DCOUNTA but my results
--
dh13134

Eduardo

"DCOUNTA-ING" too many items...
 
Hi,
the Dcounta function counts the non blank cells in the range use the countif
instead

=COUNTIF(A5:A25,"electronics")

"dh13134" wrote:

i have several industry group names in a column - general example:
A5 thru A10 contain "Electronics" (5 total)
A10 thru A15 contains "Electronics Semiconductors" (5 total)
A15 thru A20 contains "Electronics Equipment" (5 total)

when i use the DCOUNTA function with "Electronics" as my criteria, the
result gives me 15 "answers", when i only want 5 - "Electronics". i'm getting
everything that even "contains" "Electronics" instead of only the 5 that i
want.
any thoughts would be appreciated.

i'm using DCOUNTA but my results
--
dh13134


dh13134

"DCOUNTA-ING" too many items...
 
does your answer still apply since i'm using "D"COUNTA in a database query?

also, my criteria is a cell reference instead of entered "text", as you
suggestion shows. -example:

=DCOUNTA('sheet1'!A5:A20,C1,C1:C2))

C1 has my field - GROUP

C1:C2 has my crieria -
GROUP
Electronics

any further thoughts??

--
dh13134


"Eduardo" wrote:

Hi,
the Dcounta function counts the non blank cells in the range use the countif
instead

=COUNTIF(A5:A25,"electronics")

"dh13134" wrote:

i have several industry group names in a column - general example:
A5 thru A10 contain "Electronics" (5 total)
A10 thru A15 contains "Electronics Semiconductors" (5 total)
A15 thru A20 contains "Electronics Equipment" (5 total)

when i use the DCOUNTA function with "Electronics" as my criteria, the
result gives me 15 "answers", when i only want 5 - "Electronics". i'm getting
everything that even "contains" "Electronics" instead of only the 5 that i
want.
any thoughts would be appreciated.

i'm using DCOUNTA but my results
--
dh13134


dh13134

"DCOUNTA-ING" too many items...
 
your suggestion DOES work, (=COUNTIF(A5:A25,"electronics")
), but i'm curious about why my DCOUNT method returns too much info. any
further thoughts before we "close" this thread?
--
dh13134


"Eduardo" wrote:

Hi,
the Dcounta function counts the non blank cells in the range use the countif
instead

=COUNTIF(A5:A25,"electronics")

"dh13134" wrote:

i have several industry group names in a column - general example:
A5 thru A10 contain "Electronics" (5 total)
A10 thru A15 contains "Electronics Semiconductors" (5 total)
A15 thru A20 contains "Electronics Equipment" (5 total)

when i use the DCOUNTA function with "Electronics" as my criteria, the
result gives me 15 "answers", when i only want 5 - "Electronics". i'm getting
everything that even "contains" "Electronics" instead of only the 5 that i
want.
any thoughts would be appreciated.

i'm using DCOUNTA but my results
--
dh13134



All times are GMT +1. The time now is 01:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com