Professional Documents
Culture Documents
5.5
10
www.contextures.com
5.5
10
www.contextures.com
file:///conversion/tmp/scratch/404930602.xlsx 12/18/2018
Qty Count Blank Cells -- COUNTBLANK
50
5.5
10
www.contextures.com
file:///conversion/tmp/scratch/404930602.xlsx 12/18/2018
Item Qty Count cells that match criteria -- COUNTIF
Pen 5 Match criterion exactly
Pencil 9
Binder 9
Pen 6
Pen 15
Binder 12
Pencil 10
Binder 6
Pen 11
4
www.contextures.com
Item Qty Count cells that match criteria -- COUNTIF
Pen 5 Match criterion in a string
Pencil 9
Binder 9
Pen 6
Gel Pen 12
Binder 12
Pencil 10
Binder 6
Pen 11
6
6 pen <==enter a text string in the yellow cell, e.g. "pen"
www.contextures.com
Item Qty Count cells that match criteria -- COUNTIF
Pen 5 Criterion and operator
Pencil 9
Binder 9
Pen 6
Pen 15
Binder 12
Pencil 10
Binder 6
Pen 11
www.contextures.com
Item Qty Count cells that match criteria -- COUNTIF
Pen 5 Match criteria in a range
Pencil 9
Binder 9
Pen 6
Pen 15
Binder 12
Pencil 10
Binder 6
Pen 11
6
www.contextures.com
Code Dup COUNTIF Dup SUMPRODUCT
123 0 0 The second argument of COUNTIF is
00123 1 0 treated as text, so you might see false duplicates
234 0 0 such as 00123 = 123
567 0 0
00567 1 0 Use SUMPRODUCT to avoid this, where necessary
0000234 1 0
0234 1 0
5678 0 0
000234 1 0
List Type Count Numbers in Other Numbers
12345 Num Find specific numbers or letters within other numbers or text strings
A12345 Text
a12345 Text Count: 1 In the list, 4 items contain "1" (case-sensitive)
B23456 Text In the list, 4 items contain "1" (NOT case-sensitive)
12345 Text
23456 Num Use SUMPRODUCT with ISNUMBER and FIND or SEARCH
Use FIND to count numbers, or case-sensitive letters
4 =SUMPRODUCT(--ISNUMBER(FIND($E$4,$A$2:$A$7)))
Use SEARCH to count numbers, or upper and lower case letters (not case-sensitive)
4 =SUMPRODUCT(--ISNUMBER(SEARCH($E$4,$A$2:$A$7)))
COUNTIF does NOT count numbers within a number, just in a text string
When looking for "1", COUNTIF gives an incorrect result -- 3 -- because it doesn't count cell B2
3 =COUNTIF($A$2:$A$7,"*" & E4 & "*")
se-sensitive)
2
www.contextures.com
SUMPRODUCT
Item Qty Sold Count cells that do not contain an empty string
Pen 5 Pen
Pencil COUNTIF <> 9 <== counts text and empty strings
Binder 9 Binder COUNTIF <> & "" 9 <== counts text and empty strings
Pen 6 Pen COUNTIF >=! 5 <== counts cells with text >= ! (char
Pen COUNTIF ?* 5 <== counts cells with at least one ch
Binder 1
Pencil 10 Pencil COUNTA 9 counts all text, including empty string
Binder COUNTBLANK 3 counts empty strings as if blank
Pen 11 Pen Difference 6 subtract empty cells from total count
3
Code Character
32
33 !
34 "
35 #
36 $
37 %
38 &
39 '
40 (
41 )
42 *
43 +
44 ,
45 -
46 .
47 /
48 0
49 1
50 2
51 3
52 4
53 5
54 6
55 7
56 8
57 9
58 :
59 ;
60 <
61 =
tain an empty string ""
unts text and empty strings
unts text and empty strings
unts cells with text >= ! (char 33)
unts cells with at least one character
www.contextures.com
COUNTIFS
Day Region Qty Problem Count cells with any text in one column,
Mon East 95 late specific text in another column -- COUNTIFS
Tue West 150 For Excel 2007 and later versions only
Wed West 137 hold
Thu West 112 Region East
Fri Central 57 defects
Mon West 69 Problems 2 East Region Problems
Tue East 126
Wed East 130 shortage Qty 471 Sum for East region
Thu East 120
Fri West 84 Count 4 Count of East region
www.contextures.com
List -- SUBTOTAL
Count: 2 AGGREGATE - ignore errors
=AGGREGATE(3,3,Table1[Total])
www.contextures.com
tered List -- AGGREGATE
Item Units Cost Total Count Visible Items in a Filtered List
Pen 15 15 225
Binder 12 10 120
Pen 11 15 165
Pen #VALUE!
The Total column is filtered for
amounts greater than 100.
The SUMPRODUCT formula
www.contextures.com
counts only the visible
occurrences of Pen in cells
A1:A10
Filtered List
Contextures Products
Pivot Power Premium Add-in
UserForms for Data Entry ebook Kit
Contextures Excel Tools Add-in
Data Entry Search Popup
Data Entry Popup
30 Excel Functions in 30 Days eBook Kit
www.contextures.com 12/18/2018
Time-saving tools for pivot table power users
Step by step instructions and videos
Make instant backups, sort sheets, and many more tools
Makes data entry easier when choosing from long list
Select single or multiple items from a listbox, to enter in a single cell
Sample workbook and easy to follow user guide for key Excel functions
www.contextures.com 12/18/2018