Error Count (Formula please)

Will from London

Board Regular
Joined
Oct 14, 2004
Messages
220
Hi

I am trying to come up with a formula that will count the number of errors in a range. I want the sum of all of the standard Excel errors (e.g. #DIV/0!) but also my own error messages (e.g. "#ERROR"). For the latter the first character will always be "#" and there will be no other occurences of "#" in the range.

F4 contains the range e.g. A5:Z2000

=SUMPRODUCT(--(ISERROR(INDIRECT($F$4))))
will count the number of the usual Excel errors

=SUMPRODUCT(--(LEFT(INDIRECT($F$4),1)="#"))
will count the number of occurences of my #ERROR entries it will generate an error where there are the usual Excel errors.

=SUMPRODUCT(--(ISERROR(INDIRECT($F$4)))) + SUMPRODUCT(--(LEFT(INDIRECT($F$4),1)="#"))
will display the number of #ERROR messages where there are no #DIV/0! messages but will display #DIV/0! where there are #DIV/0 errors...

Any help would be much appreciated.

Thanks

Will
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
=SUMPRODUCT(ISERROR(INDIRECT($F$4))+0)+COUNTIF(INDIRECT($F$4),"#*")
should work.
Of course, it would be easier if your functions returned native errors too. ;)
 
Last edited:
Upvote 0
Perfect, thank you.

(My own error messages are designed to give pointers on how to resolve them which would show up when the sheet is printed).
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,946
Latest member
JoseDavid

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