Microsoft has implemented the concept of Multi-threading to solve the formulas in a spreadsheet (I believe from Excel 2007). Because of this, if a machine has more than one core, Excel will use the configured amount (by default all) to evaluate the formulas contained in a worksheet. Note, however, that this is done only for the evaluation of native formulas. The same does not occur in VBA code.
In order to solve a problem (via VBA) in parallel, it would be necessary to divide your problem into several instances of Excel. Since each Excel in this scenario is a separate process, then Windows itself will allocate each Excel to a core, thus speeding up the execution of the code.
However, it can be a bit tricky to do this, since you first need to check what's parsable in your code. That done, you should have some way to instantiate each Excel for VBA code to run (a VBS script can help). After that, you need to merge the result.
If your problem is not so easily paralleled, then there is not much to do. It may be that VBA is not a good choice for the problem to be solved.
Either way, the tips below can help:
-
Disable screen refresh (Application.ScreenUpdating = False) while VBA code is running
-
Place the calculation of the formulas manually (Application.Calculation = xlCalculationManual) also while VBA is running.
Some useful references:
link
link
link