Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
COUNTIF with wildcards
I need to count all the cells on one column with "Green" in them, but only
when another column has cells in a range with a value starting with "CC". I tried to use the following formula, thinking that wildcard characters would work, but a value of zero is returned. However, if I state the full name of the "CC" cell, it works. Anyone got any ideas please? =SUMPRODUCT(--($O$43:$O$268="Green"),--($D$43:$D$268="CC_*")) |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
COUNTIF with wildcards
try
=SUMPRODUCT(--($O$43:$O$268="Green"),--(left($D$43:$D$268,2)="CC")) "Kierano" wrote: I need to count all the cells on one column with "Green" in them, but only when another column has cells in a range with a value starting with "CC". I tried to use the following formula, thinking that wildcard characters would work, but a value of zero is returned. However, if I state the full name of the "CC" cell, it works. Anyone got any ideas please? =SUMPRODUCT(--($O$43:$O$268="Green"),--($D$43:$D$268="CC_*")) |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
COUNTIF with wildcards
Thanks BJ - that worked perfectly.
Sorry to be a pain, but my next problem is, if I wanted to pick up the "Greens" when another column was populated with 1, how would I do this? I've tried putting the one in quotes, also without, to no avail. "bj" wrote: try =SUMPRODUCT(--($O$43:$O$268="Green"),--(left($D$43:$D$268,2)="CC")) "Kierano" wrote: I need to count all the cells on one column with "Green" in them, but only when another column has cells in a range with a value starting with "CC". I tried to use the following formula, thinking that wildcard characters would work, but a value of zero is returned. However, if I state the full name of the "CC" cell, it works. Anyone got any ideas please? =SUMPRODUCT(--($O$43:$O$268="Green"),--($D$43:$D$268="CC_*")) |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
COUNTIF with wildcards
Just keep adding the conditions:
=SUMPRODUCT(--($O$43:$O$268="Green"), --($L$43:$L$268=1), --(left($D$43:$D$268,2)="CC")) Kierano wrote: Thanks BJ - that worked perfectly. Sorry to be a pain, but my next problem is, if I wanted to pick up the "Greens" when another column was populated with 1, how would I do this? I've tried putting the one in quotes, also without, to no avail. "bj" wrote: try =SUMPRODUCT(--($O$43:$O$268="Green"),--(left($D$43:$D$268,2)="CC")) "Kierano" wrote: I need to count all the cells on one column with "Green" in them, but only when another column has cells in a range with a value starting with "CC". I tried to use the following formula, thinking that wildcard characters would work, but a value of zero is returned. However, if I state the full name of the "CC" cell, it works. Anyone got any ideas please? =SUMPRODUCT(--($O$43:$O$268="Green"),--($D$43:$D$268="CC_*")) -- Dave Peterson |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
COUNTIF with wildcards
Thanks - I probably need to explain it better:
There are just 2 columns I'm interested in - the one with the "Greens" and the one with the "1s" in. The problem lies in picking up the 1s for some reason. "Dave Peterson" wrote: Just keep adding the conditions: =SUMPRODUCT(--($O$43:$O$268="Green"), --($L$43:$L$268=1), --(left($D$43:$D$268,2)="CC")) Kierano wrote: Thanks BJ - that worked perfectly. Sorry to be a pain, but my next problem is, if I wanted to pick up the "Greens" when another column was populated with 1, how would I do this? I've tried putting the one in quotes, also without, to no avail. "bj" wrote: try =SUMPRODUCT(--($O$43:$O$268="Green"),--(left($D$43:$D$268,2)="CC")) "Kierano" wrote: I need to count all the cells on one column with "Green" in them, but only when another column has cells in a range with a value starting with "CC". I tried to use the following formula, thinking that wildcard characters would work, but a value of zero is returned. However, if I state the full name of the "CC" cell, it works. Anyone got any ideas please? =SUMPRODUCT(--($O$43:$O$268="Green"),--($D$43:$D$268="CC_*")) -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
sumproduct vs. countif | Excel Discussion (Misc queries) | |||
Countif Formula /Sort Bug??? | Excel Discussion (Misc queries) | |||
countif wildcards? | Excel Discussion (Misc queries) | |||
Combining IF and COUNTIF based on two columns | Excel Discussion (Misc queries) | |||
Countif - Countif | Excel Worksheet Functions |