I have a spreadsheet in which I need to count items in column
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
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
-
The local account tax
by
Susan Bradley
20 minutes ago -
Recall is back with KB5055627(OS Build 26100.3915) Preview
by
Alex5723
1 hour, 47 minutes ago -
Digital TV Antenna Recommendation
by
Win7and10
1 hour, 22 minutes ago -
Server 2019 Domain Controllers broken by updates
by
MP Support
13 hours, 39 minutes ago -
Google won’t remove 3rd party cookies in Chrome as promised
by
Alex5723
15 hours, 18 minutes ago -
Microsoft Manager Says macOS Is Better Than Windows 11
by
Alex5723
18 hours, 31 minutes ago -
Outlook (NEW) Getting really Pushy
by
RetiredGeek
7 hours, 48 minutes ago -
Steps to take before updating to 24H2
by
Susan Bradley
6 hours, 20 minutes ago -
Which Web browser is the most secure for 2025?
by
B. Livingston
1 hour, 22 minutes ago -
Replacing Skype
by
Peter Deegan
8 hours, 52 minutes ago -
FileOptimizer — Over 90 tools working together to squish your files
by
Deanna McElveen
12 hours, 22 minutes ago -
Excel Macro — ask for filename to be saved
by
nhsj
20 hours, 49 minutes ago -
Trying to backup Win 10 computer to iCloud
by
SheltieMom
13 hours, 17 minutes ago -
Windows 11 Insider Preview build 26200.5570 released to DEV
by
joep517
2 days, 18 hours ago -
Windows 11 Insider Preview build 26120.3941 (24H2) released to BETA
by
joep517
2 days, 20 hours ago -
Windows 11 Insider Preview Build 22635.5305 (23H2) released to BETA
by
joep517
2 days, 20 hours ago -
No April cumulative update for Win 11 23H2?
by
Peobody
1 day, 8 hours ago -
AugLoop.All (TEST Augmentation Loop MSIT)
by
LarryK
2 days, 20 hours ago -
Boot Sequence for Dell Optiplex 7070 Tower
by
Serge Carniol
3 days, 11 hours ago -
OTT Upgrade Windows 11 to 24H2 on Unsupported Hardware
by
bbearren
3 days, 15 hours ago -
Inetpub can be tricked
by
Susan Bradley
1 day, 22 hours ago -
How merge Outlook 2016 .pst file w/into newly created Outlook 2024 install .pst?
by
Tex265
2 days, 9 hours ago -
FBI 2024 Internet Crime Report
by
Alex5723
3 days, 19 hours ago -
Perplexity CEO says its browser will track everything users do online
by
Alex5723
1 day, 4 hours ago -
Login issues with Windows Hello
by
CWBillow
4 days, 6 hours ago -
How to get into a manual setup screen in 2024 Outlook classic?
by
Tex265
3 days, 18 hours ago -
Linux : ARMO rootkit “Curing”
by
Alex5723
4 days, 17 hours ago -
Employee monitoring app leaks 21 million screenshots in real time
by
Alex5723
4 days, 17 hours ago -
Google AI is now hallucinating idioms
by
Alex5723
4 days, 18 hours ago -
april update
by
69800
2 days, 22 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.