arrays verses worksheet for math

zrx1200

Well-known Member
Joined
Apr 14, 2010
Messages
601
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
 

Some videos you may like

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Swayzy

Board Regular
Joined
Mar 30, 2018
Messages
78
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:

offthelip

Well-known Member
Joined
Dec 23, 2017
Messages
1,240
Office Version
2010
Platform
Windows
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!!)
 

Watch MrExcel Video

Forum statistics

Threads
1,099,081
Messages
5,466,528
Members
406,484
Latest member
kaksolver

This Week's Hot Topics

Top