Count and sum excluding a range of cells

elk03

Board Regular
Joined
Jan 30, 2020
Messages
98
Office Version
  1. 2019
Hi, I am trying to count and sum cells in a range but excluding a long list of names, and exclude blank cells. I am having trouble creating a formula that will work though. I have a big data set based on location of state. I am looking to count and sum those cells that do not have a State listed. They have other random names listed instead. Thanks.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Basic principle of the formula, without seeing an example of the sheet layout this is the best I can offer.
Sum
Excel Formula:
=SUMPRODUCT(--ISNA(MATCH(name list, list to exclude, FALSE)),List to sum)
count
Excel Formula:
=SUMPRODUCT(--ISNA(MATCH(name list, list to exclude, FALSE)))
 
Upvote 0
Solution
Thank you very much, that seemed to work. It does count blank cells though. I think I can work around that, but is there a simple way to also exclude blank cells?
 
Upvote 0
Oops, I forgot to allow for that.
Excel Formula:
=SUMPRODUCT(--ISNA(MATCH(name list, list to exclude, FALSE)),--(name list<>""),List to sum)
 
Upvote 0

Forum statistics

Threads
1,215,029
Messages
6,122,755
Members
449,094
Latest member
dsharae57

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