ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I just update values on several cells (not the entire works (https://www.excelbanter.com/excel-programming/325545-how-do-i-just-update-values-several-cells-not-entire-works.html)

Jeff

How do I just update values on several cells (not the entire works
 
Hi all,
I have a worksheet contents 1 data sheet and 2 charts on sheet2, and
sheet3.

On the data sheet, I used a 3rd party add-in to generate some data. A
couple cells on that sheet will then be calculated based on the values
obtained from the plug-in. I can update everything by hitting F9, but since
that updating the data using plug in takes forever, I'd be better off just to
click each cell to trig that to update. I am wondering if there is a way
(using code) to just update the selected few cells, and the 2 charts but not
the rest of the cells in the workbook.

Thanks.

Shawn O'Donnell

How do I just update values on several cells (not the entire works
 
"Jeff" wrote:
On the data sheet, I used a 3rd party add-in to generate some data. A
couple cells on that sheet will then be calculated based on the values
obtained from the plug-in. I can update everything by hitting F9, but since
that updating the data using plug in takes forever, I'd be better off just to
click each cell to trig that to update. I am wondering if there is a way
(using code) to just update the selected few cells, and the 2 charts but not
the rest of the cells in the workbook.


So you've got AutoCalculation turned off and you want to recalculate
specific cells?

Ranges (and Cells, since Cells are Ranges, too) have a Calculate method.

One cell at a time: for the cell in row rowindex and column columnindex:

Worksheets(sheetname).Cells(rowindex, columnindex).Calculate

For a range that includes C12 to C15 and D16 to D19:

Worksheets(sheetname).Range("C12:C15,D16:D19").Cal culate


When you recalc the cells, the tables should update automatically.


Shawn O'Donnell

How do I just update values on several cells (not the entire w
 
When you recalc the cells, the tables should update automatically.

Charts... the charts should update automatically.


All times are GMT +1. The time now is 01:16 AM.

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