Have 2 columns of figures (temperatures) & I would like excel to count how many of the said temperatures are negative, that I can do BUT (always a but) this is what I would like the formula to recognise & count – if 2 temperatures are negative in ajoining cells, then count that as one. ie say a1 & b1 both have a -ve value then excel to count one for row 1.The max count for any row has to be one. Hope I have explained this okay. cheers andrew macdonald.
![]() |
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 |
-
Counting (97 & 2000)
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Counting (97 & 2000)
- This topic has 9 replies, 5 voices, and was last updated 23 years, 4 months ago.
AuthorTopicWSandrewmac
AskWoody LoungerJanuary 18, 2002 at 6:32 am #365588Viewing 1 reply threadAuthorReplies-
WSpieterse
AskWoody Lounger -
WSJohnBF
AskWoody Lounger -
WSAladin Akyurek
AskWoody LoungerJanuary 19, 2002 at 3:25 pm #564844 -
WSJohnBF
AskWoody LoungerJanuary 20, 2002 at 11:54 pm #565023 -
WSAladin Akyurek
AskWoody LoungerJanuary 21, 2002 at 5:45 am #565041John —
I think there are 2 possible readings of what the original poster wanted:
One reading implicates
(a) ORing and another
(ANDing.
I’m sure Jan Karel was also aware of this. He simply opted for reading (a).
In array or sumproduct formulas + does the ORing, * the ANDing. Your first attempt was altogether a different thing (which prompted my reply). Fred gave an array formula with IFs, equivalent to Jan Karel’s which is constructed with Boolean terms. If the latter reading would be what the OP wants, then
{=SUM((A1:A20<0)*(B1:B20<0))
would be indeed the answer.
By the way, these two formulas have the following, normally entered, equivalents with sumproduct:
=SUMPRODUCT((((A1:A10<0)+(B1:B100)+0)
=SUMPRODUCT((A1:A20<0)*(B1:B20<0))
Regards,
Aladin
-
WSpieterse
AskWoody Lounger -
WSfburg
AskWoody LoungerJanuary 21, 2002 at 12:39 pm #565081Hi Jan Karel,
Since you’re the last poster on this, I guess I’ll respond to you.
It was good for John to put all the solutions together in 1 sheet. That way, the originator can pick what they want.
I read the original post as wanting to count a row if:
– both cols were negative, or
– one col was negativeOr put another way, count the rows where there is at least one col with a neg number. So I disagree with John that this should be an AND condition as posted in his latest. The way I constructed the IF did provide an OR.
Anyway, whether it’s AND or OR, John’s workbook has them all.
Fred
-
WSJohnBF
AskWoody Lounger
-
-
-
-
-
WSfburg
AskWoody LoungerJanuary 20, 2002 at 1:07 pm #564945Looking at the subsequent posts on the thread, I agree with Aladin that John’s solution doesn’t do the same as Jan’s. The case of {-1,1} on the same row results in cancellation and is not counted. The case of {4,-3} results in the positive swamping out the negative and is not counted either.
For my 2 cents, here’s another solution:
{ =SUM(IF(A1:A6>=0,IF(B1:B6>=0,0,1),1)) }This may be more intuitve but Jan’s is more extensible (IF’s can only be nested up to, I think, 7 tests).
Fred
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
-
To download Win 11 Pro 23H2 ISO. (Awaiting moderation)
by
Eddieloh
1 hour, 17 minutes ago -
Manage your browsing experience with Edge
by
Mary Branscombe
1 hour, 55 minutes ago -
Fewer vulnerabilities, larger updates
by
Susan Bradley
33 minutes ago -
Hobbies — There’s free software for that!
by
Deanna McElveen
1 hour, 57 minutes ago -
Apps included with macOS
by
Will Fastie
1 hour, 58 minutes ago -
Xfinity home internet
by
MrJimPhelps
6 hours, 47 minutes ago -
Convert PowerPoint presentation to Impress
by
RetiredGeek
8 hours, 47 minutes ago -
Debian 12.11 released
by
Alex5723
17 hours, 13 minutes ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
20 hours, 54 minutes ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
21 minutes ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
17 hours, 23 minutes ago -
DBOS Advanced Network Analysis
by
Kathy Stevens
1 day, 13 hours ago -
Microsoft Edge Launching Automatically?
by
healeyinpa
1 day, 4 hours ago -
Google Chrome to block admin-level browser launches for better security
by
Alex5723
1 day, 16 hours ago -
iPhone SE2 Stolen Device Protection
by
Rick Corbett
1 day, 8 hours ago -
Some advice for managing my wireless internet gateway
by
LHiggins
16 hours, 19 minutes ago -
NO POWER IN KEYBOARD OR MOUSE
by
HE48AEEXX77WEN4Edbtm
9 hours, 10 minutes ago -
A CVE-MITRE-CISA-CNA Extravaganza
by
Nibbled To Death By Ducks
2 days, 1 hour ago -
Sometimes I wonder about these bots
by
Susan Bradley
1 day, 22 hours ago -
Does windows update component store “self heal”?
by
Mike Cross
1 day, 12 hours ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
2 days, 15 hours ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
23 hours, 53 minutes ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
12 hours, 32 minutes ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
2 days, 18 hours ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
2 days, 18 hours ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
2 days, 7 hours ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
3 days, 2 hours ago -
0Patch, where to begin
by
cassel23
2 days, 20 hours ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
3 days, 16 hours ago -
89 million Steam account details just got leaked,
by
Alex5723
3 days, 4 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.