Clearing an Array

business_analyst

Board Regular
Joined
Jun 5, 2009
Messages
99
I have a 2 dimensional array filled with variables, doubles to be specific in type. I would like to set all positions to 0, when a specific radio button is selected. Is there a built in function that can assist me to do this? Or do I just have to loop through and set every position to 0? Any help would be greatly appreciated, thanks!
 

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.

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,419
If MyArr is the name of your 2D array, then try...
Code:
Erase MyArr
 

Watch MrExcel Video

Forum statistics

Threads
1,133,720
Messages
5,660,515
Members
418,581
Latest member
gtarr

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
Top