improve processing speed- individual patient simulation purely in VBA

rbkh79

New Member
Joined
Jul 20, 2016
Messages
11
Hello- I have an individual patient simulation model that I have built in excel.
In order to improve the processing speed I have been told that there is a way to have all of the simulations run in VBA and not documented line by line in excel. I was told that there is also a way to print a report of the VBA activities.

So my questions are:
1) How do I have the code run purely in VBA?
2) How can I print a report of the VBA simulation, if needed?

Thank you!!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
To clarify, what I mean is that the outputs for each patient are temporarily stored in VBA as opposed to line by line in the excel workbook.
 
Upvote 0
You place a range into an array, then process the array, eg

Code:
    Dim arr() As Variant
    arr = Range("A1:C4")
    For r = 1 To UBound(arr, 1)
        For c = 1 To UBound(arr, 2)
            Debug.Print arr(r, c)
        Next
    Next
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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