arrays verses worksheet for math

zrx1200

Well-known Member
Joined
Apr 14, 2010
Messages
622
Office Version
  1. 2019
Platform
  1. Windows
I have a workbook which currently uses a worksheet to do a lot of math for a user form. Speed, accuracy and overall performance is very stable so far.

My question is, I've always wanted to do the math in memory with arrays just because I guess and learn arrays. So short of that is there a more compelling reason to make this move that I may not be aware of? Or, if its not broke don't fix it apply?

Ralph
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Arrays and collections in vba is faster for calculations. They are a good way to if you need to do alot of manipulation with lots of cells/data points.

So you dont use them much until you have macros that är painfully slow
 
Last edited:
Upvote 0
It is usually fairly easy to convert a worksheet mathematical model into VBA. I have done it many times. What I usually do is while developing and testing the VBA is I write out all the intermediate stages which tie up with the same stages on the worksheet. I then use EXCEL to compare the two to check they are the same. Once I am sure it is correct I just comment out the write statements ( apart the final one!!)
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,203
Members
452,617
Latest member
Narendra Babu D

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