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

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
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,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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