Sumproduct Errors

Tikey

Board Regular
Joined
Jan 30, 2014
Messages
148
Office Version
  1. 2021
Platform
  1. Windows
I have been using the following to sum the number of valuesin a list without counting the same value twice and ignoring any cells wherethere is no data.

=SUMPRODUCT(($V$17:$V$40<>"")/COUNTIF($V$17:$V$40,$V$17:$V$40&""))

This works fine, but in some cells I could have errors ie#VALUE! and this creates an error.

How can the function be modified to ignore any errors incells and also not be restricted to a range of cells ( ie V17:V40 in the above) but cover a whole column ?

Thanks
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
This formula seems to do what you want:
Code:
=SUMPRODUCT(ISNUMBER($V:$V)/COUNTIF($V:$V,$V:$V&""))

However....NEVER perform an operation on every cell in a column. There are ways to avoid doing that. Typically, using Excel Tables.
 
Upvote 0
Ron Thanks very much for your reply which works fine on just numbers,but my post wasn’t clear enough, as the values contain letters as well asnumbers which causes the formula to fail. Is there a way of dealing with both in one cell ie SE345678 and still avoiding any errors ? You also mention never performing a task on every cell in acolumn, if this is to be avoided, can the formula automatically adjust itselfto cover a change in the range of cells or would this have to be done manually? Thanks for any help you can suggest.
 
Upvote 0

Forum statistics

Threads
1,223,713
Messages
6,174,039
Members
452,542
Latest member
Bricklin

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