Counting both negative and postive numbers in 1 formula

Neavalmi

New Member
Joined
Jun 14, 2009
Messages
43
Hi Excel Experts,

I have two columns, A contains Planned LOC Years (2019,2020 and 2021, no plans ,etc), B savings in dollars sometime neg (with savings) and sometimes postive (no savings) and blanks or sometime also zero.

I want to count in the summary sheet all line with savings both negative and postive per YEAR

Column A B
2019 2,000
2019 -100
2019 3,000
2020 -500
2021 0
No Plans
Dropped

Summary
Planned LOC Year Parts with Savings
2019 3
2020 1
2021 0
No Plans 0
Dropped 0

Hope my explanation is clear.

Thanks excel experts
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Try

Code:
=SUMPRODUCT((A1:A5=2019)*(B1:B5<>0))

change the year to suit
 
Upvote 0
You could also use a pivot table with 'Count' option for the data area - this would make it easier to refresh the summary - you wont need to add a formula every time a new year/category is added to Col A.
 
Upvote 0

Forum statistics

Threads
1,215,232
Messages
6,123,768
Members
449,122
Latest member
sampak88

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