Count "All" occurrences of a category from a drop down list

Chilly2011

New Member
Joined
May 29, 2011
Messages
6
Good morning

I have previously received some great assistance for a problem I had using the Countifs function from Joris, a board regular. I wish to expand on this formula to be able to achieve a new level of functionality for a project I'm working on.

I currently have the below data on one sheet:

Excel 2013 32 bit
A
B
C
D
1
YYYY-MM-DD
hh:mm:ss
Dr
Speed
2
9/04/2016​
16:11:51​
W0​
86​
3
9/04/2016​
16:14:44​
W0​
92​
4
9/04/2016​
16:14:46​
W0​
97​
5
9/04/2016​
16:14:49​
W0​
92​
6
9/04/2016​
16:15:37​
E1​
96​
7
9/04/2016​
16:15:50​
E1​
97​
8
9/04/2016​
16:17:24​
W0​
91​
9
9/04/2016​
16:18:01​
W0​
105​
10
9/04/2016​
16:18:58​
W0​
101​

<tbody>
</tbody>
Sheet: 20209

<tbody>
</tbody>

On another sheet I have a summary table which aims at identifying trends by using a drop down box (located in cells B2, B3 and B4 below) to select items and conditionally format the table contents using the Countifs formula. This is a condensed version of the original table:

Excel 2013 32 bit
ABCDEFGHIJKLMNOPQRSTUVWXYZ
2Speed110
3DirectionE1
4TypeALL
5
600:00:0001:00:0002:00:0003:00:0004:00:0005:00:0006:00:0007:00:0008:00:0009:00:0010:00:0011:00:0012:00:0013:00:0014:00:0015:00:0016:00:0017:00:0018:00:0019:00:0020:00:0021:00:0022:00:0023:00:00
701:00:0002:00:0003:00:0004:00:0005:00:0006:00:0007:00:0008:00:0009:00:0010:00:0011:00:0012:00:0013:00:0014:00:0015:00:0016:00:0017:00:0018:00:0019:00:0020:00:0021:00:0022:00:0023:00:0000:00:00
8Fri8/04/2016000000000000000000000000

<tbody>
</tbody>
Time Chart 20209

It contains the following formula which was kindly provided to me. I have used named ranges to make it easier for me to understand:



Worksheet Formulas
CellFormula
C8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,"<="&'Time Chart 20209'!C$7)
D8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!D$6,Time20209,"<="&'Time Chart 20209'!D$7)
E8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!E$6,Time20209,"<="&'Time Chart 20209'!E$7)
F8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!F$6,Time20209,"<="&'Time Chart 20209'!F$7)
G8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!G$6,Time20209,"<="&'Time Chart 20209'!G$7)
H8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!H$6,Time20209,"<="&'Time Chart 20209'!H$7)
I8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!I$6,Time20209,"<="&'Time Chart 20209'!I$7)
J8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!J$6,Time20209,"<="&'Time Chart 20209'!J$7)
K8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!K$6,Time20209,"<="&'Time Chart 20209'!K$7)
L8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!L$6,Time20209,"<="&'Time Chart 20209'!L$7)
M8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!M$6,Time20209,"<="&'Time Chart 20209'!M$7)
N8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!N$6,Time20209,"<="&'Time Chart 20209'!N$7)
O8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!O$6,Time20209,"<="&'Time Chart 20209'!O$7)
P8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!P$6,Time20209,"<="&'Time Chart 20209'!P$7)
Q8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!Q$6,Time20209,"<="&'Time Chart 20209'!Q$7)
R8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!R$6,Time20209,"<="&'Time Chart 20209'!R$7)
S8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!S$6,Time20209,"<="&'Time Chart 20209'!S$7)
T8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!T$6,Time20209,"<="&'Time Chart 20209'!T$7)
U8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!U$6,Time20209,"<="&'Time Chart 20209'!U$7)
V8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!V$6,Time20209,"<="&'Time Chart 20209'!V$7)
W8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!W$6,Time20209,"<="&'Time Chart 20209'!W$7)
X8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!X$6,Time20209,"<="&'Time Chart 20209'!X$7)
Y8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!Y$6,Time20209,"<="&'Time Chart 20209'!Y$7)
Z8=COUNTIFS(Speed20209,">="&'Time Chart 20209'!$B$2,Direction20209,'Time Chart 20209'!$B$3,Date20209,'Time Chart 20209'!$B8,Time20209,">="&'Time Chart 20209'!Z$6)

<tbody>
</tbody>

<tbody>
</tbody>

Workbook Defined Names
NameRefers To
Date20209='20209'!$A$2:$A$7112
Direction20209='20209'!$C$2:$C$7112
Speed20209='20209'!$D$2:$D$7112
Time20209='20209'!$B$2:$B$7112

<tbody>
</tbody>

<tbody>
</tbody>

My goal is to be able to Count All categories of each drop down list when the choice, "Both" or similar word is selected. For example, in Cell B3 (Direction) I currently only have the option of selecting either "W1" or "E0". I want to include the word "Both" in the drop down list and then have it count both "W1" and "E0" together as a total. As can be seen the criteria has a combination of letters and numbers.

This one has me stumped.

Thanks in advance.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,215,779
Messages
6,126,852
Members
449,345
Latest member
CharlieDP

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top