ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Calculating Selected Cells (https://www.excelbanter.com/excel-discussion-misc-queries/39637-calculating-selected-cells.html)

NlCO

Calculating Selected Cells
 

Hi, I need a little help here, I'm working in a "heavy" spreadsheet that
has hundredrs of arrays, lots of macros and other staff.

In my macros I used Activesheet.Calculate so it does'nt calculate the
whole workbook everytime.

Also I've pase all the possible values to make the file "lighter", but
what I can't do is make it work faster, sometimes I've change just one
formula and I have to calculate the whole sheet (SHIFT+F9) to get the
result (I've disabled the automatic calculation)
Is there any way to calculate just one cell or a group of them?

Thanks

NlCO


--
NlCO
------------------------------------------------------------------------
NlCO's Profile: http://www.excelforum.com/member.php...o&userid=26123
View this thread: http://www.excelforum.com/showthread...hreadid=394528


dominicb


Good morning Nico

Highlight a portion of your spreadsheet and then run the code below.
This should recalculate only the highlighted section of your sheet.

Sub Recalc()
ActiveWindow.RangeSelection.Calculate
End Sub

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=394528


NlCO


Thank You Dominic, I tried your solution but it didn't worked, I receive
a message saying:

Ambiguous Name Detected: Recalc

But through that error I finally found the answer:

Worksheets("Sheet1").UsedRange.Range("E30:E56,G30: G56").Calculate

Thanks a lot

Nico :) :)


--
NlCO
------------------------------------------------------------------------
NlCO's Profile: http://www.excelforum.com/member.php...o&userid=26123
View this thread: http://www.excelforum.com/showthread...hreadid=394528



All times are GMT +1. The time now is 01:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com