I have a spreadsheet in which I need to count items in column
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Count items in one column based on another column (97, XP)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Count items in one column based on another column (97, XP)
- This topic has 10 replies, 3 voices, and was last updated 21 years, 11 months ago.
AuthorTopicWSDon_Sadler
AskWoody LoungerMay 18, 2003 at 5:11 pm #387692Viewing 1 reply threadAuthorReplies-
WSHansV
AskWoody Lounger -
WSDon_Sadler
AskWoody LoungerMay 18, 2003 at 11:20 pm #677638Thanks for the example. I guess i was not as clear as I should have been about the codes. For each name, there will likely be seveal codes repeated and I need to be able to count how many of each code for each name. In other words, for Smith there might be 6 “SE 09’s” and 4 “CI 03’s”, and so on.
-
WSHansV
AskWoody Lounger -
WSDon_Sadler
AskWoody Lounger -
WSDon_Sadler
AskWoody LoungerMay 19, 2003 at 1:56 am #677656Okay, I found the answer. I don’t understand why or how it works but it does work. if anyone can explain it, I would appreciate it. I found the answer on John Walkenbach’s page (http://j-walk.com/ss/excel/tips/tip74.htm%5B/url%5D ). His tip said.. and I quote
Count of Sales where Month=”Jan” AND Region=”North”
For multiple criteria in different fields, the COUNTIF function doesn’t work. However, you can use an array formula. When you enter this formula, use Ctrl+Shift+Enter:=SUM((A2:A10=”Jan”)*(B2:B10=”North”))
————
I just substituted appropriate ranges and criteria. -
WSHansV
AskWoody LoungerMay 19, 2003 at 11:24 am #677687This type of formula uses the fact that in Excel formulas TRUE = 1 and FALSE = 0.
A2:A10=”Jan” evaluates to an array of 1 and 0 with 1 in the places where the cell value is equal to “Jan”.
B2:B10=”North” evaluates to an array of 1 and 0 with 1 in the places where the cell value is equal to “North”.
If you multiply these, you get an array of 1 and 0. Since 0 * 0 = 0, 1 * 0 = 0, 0 * 1 = 0 and 1 * 1 = 1, this array will only have 1 where the value in column A is “Jan” AND the value in column B is “North”.
The SUM function adds the values in this array. The sum is equal to the number of values equal to 1, i.e. the number of times that the cell in column A is equal to “Jan” AND the cell in column B is equal to “North”.Here is a table as illustration:
A B C D E 1 Month Region A2:A10=”Jan” B2:B10=”North” (A2:A10=”Jan”)*(B2:B10=”North”) 2 Jan North TRUE TRUE 1 3 Jan West TRUE FALSE 0 4 Jan South TRUE FALSE 0 5 Feb East FALSE FALSE 0 6 Feb North FALSE TRUE 0 7 Feb West FALSE FALSE 0 8 Mar South FALSE FALSE 0 9 Mar East FALSE FALSE 0 10 Mar North FALSE TRUE 0 11 -
WSDon_Sadler
AskWoody Lounger -
WSHansV
AskWoody Lounger
-
-
-
-
-
WSfatherjack
AskWoody Lounger -
WSHansV
AskWoody Lounger
-
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
WU help needed with “Some settings are managed by your organization”
by
Peobody
26 minutes ago -
No Newsletters since 27 January
by
rog7
1 hour, 10 minutes ago -
Linux Mint Debian Edition 7 gets OEM support, death of Ubuntu-based Mint ?
by
Alex5723
1 hour, 31 minutes ago -
Windows Update “Areca Technology Corporation – System – 6.20.0.41”
by
Bruce
2 hours, 40 minutes ago -
Google One Storage Questions
by
LHiggins
3 hours, 51 minutes ago -
Button Missing for Automatic Apps Updates
by
pmcjr6142
18 minutes ago -
Ancient SSD thinks it’s new
by
WSila
7 hours, 49 minutes ago -
Washington State lab testing provider exposed health data of 1.6 million people
by
Nibbled To Death By Ducks
11 hours, 49 minutes ago -
WinRE KB5057589 fake out
by
Susan Bradley
5 hours, 9 minutes ago -
The April 2025 Windows RE update might show as unsuccessful in Windows Update
by
Susan Bradley
18 hours, 1 minute ago -
Firefox 137
by
Charlie
2 hours, 38 minutes ago -
Whisky, a popular Wine frontend for Mac gamers, is no more
by
Alex5723
1 day ago -
Windows 11 Insider Preview build 26120.3863 (24H2) released to BETA
by
joep517
1 day ago -
Windows 11 Insider Preview build 26200.5551 released to DEV
by
joep517
1 day ago -
New Windows 11 PC setup — can I start over in the middle to set up a local id?
by
ctRanger
28 minutes ago -
Windows 11 Insider Preview Build 26100.3902 (24H2) released to Release Preview
by
joep517
1 day, 3 hours ago -
Oracle kinda-sorta tells customers it was pwned
by
Nibbled To Death By Ducks
1 day, 10 hours ago -
Global data centers (AI) are driving a big increase in electricity demand
by
Kathy Stevens
1 day, 20 hours ago -
Office apps read-only for family members
by
b
1 day, 22 hours ago -
Defunct domain for Microsoft account
by
CWBillow
1 day, 19 hours ago -
24H2??
by
CWBillow
2 hours, 21 minutes ago -
W11 23H2 April Updates threw ‘class not registered’
by
WindowsPersister
1 day, 4 hours ago -
Master patch listing for April 8th, 2025
by
Susan Bradley
8 hours, 41 minutes ago -
TotalAV safety warning popup
by
Theodore Nicholson
19 hours, 15 minutes ago -
two pages side by side land scape
by
marc
3 days, 20 hours ago -
Deleting obsolete OneNote notebooks
by
afillat
3 days, 22 hours ago -
Word/Outlook 2024 vs Dragon Professional 16
by
Kathy Stevens
3 days, 1 hour ago -
Security Essentials or Defender?
by
MalcolmP
3 days, 4 hours ago -
April 2025 updates out
by
Susan Bradley
1 hour, 55 minutes ago -
Framework to stop selling some PCs in the US due to new tariffs
by
Alex5723
2 days, 21 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.