Javascript errors and how to deal with them

DougJ

New Member
Joined
Jan 11, 2007
Messages
32
I am just starting with JavaScript in Excel, and I have downloaded the "Excel JavaScript UDFS" book from this site.

I have installed the sample add-in, but I have a problem with the RangeAverage function:

With a large range (e.g. 1 column x >500,000 rows) it returns #NA #.
After returning this error it doesn't work on small ranges, until I restart the addin.

So the questions are:
Is there any way to set up JavaScript UDFs so they will deal with ranges of any size?
Is there any way to trap errors so you don't need to restart the addin every time an error occurs?
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,223,888
Messages
6,175,207
Members
452,618
Latest member
Tam84

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