Is there a way to calculate just a specific range but not the rest of a worksheet? I'd like to do this to save a lot of time with a large file.........
Is there a way to calculate just a specific range but not the rest of a worksheet? I'd like to do this to save a lot of time with a large file.........
Hello Madmanmac,
Use the Range object and the Calculate method. Here are a few examples. The example assumes Worksheet1 is the active sheet...
Sincerely,'Calculate a given range of cells Range("A1:A50").Calculate 'Calculate an entire row Range.Row(5).Calculate 'Calculate an entire column Range.Column("D").Calculate
Leith Ross
Hello Madmanmac,
Creating and installing macros isn't really so difficult. This macro will allow you to calculate a given range on your worksheet. You can use this macro just like any other worksheet function.
Installing the Macro:
1) Print these directions for easier reference
2) Copy the macro code below by using CTRL+C
3) Open the workbook you want the macro to run in
4) Press ALT+F11 to open the Visual Basic Editor (VBE)
5) Press ALT+I to display the Insert drop down menu
6) Press M to insert a Standard VBA module into the workbook
7) Press CTRL+V to Paste the code into the module
8) Press ALT+Q to close the VBE and return to Excel
9) Press CTRL+S to save the macro in the workbook
Macro Code:
Using it in the worksheet...Public Function CalcRange(Worksheet_Cells As Range) Application.Volatile Worksheet_Cells.Calculate CalcRange = "" End Function
Cell A1 formula: =CalcRange(A15:G50)
Sincerely,
Leith Ross
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks