ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Processing time to set values (https://www.excelbanter.com/excel-programming/315572-processing-time-set-values.html)

Eric

Processing time to set values
 
Hi all,

I'm running a macro to set some values for a long list (18,000 entries) of
data. Everything is working fine, but I'm finding that Excel takes a long
time to enter the two new pieces of data that I'm telling it to. The
calculation happens almost right away, but printing the results takes about a
second. I've tried two ways, and they both take about the same amount of
time. Here's what I've tried:

ActiveSheet.Range("AF" & activerow) = TimeBack
'ActiveCell.Offset(0, 1).Value = TimeBack
ActiveSheet.Range("AG" & activerow) = row
'ActiveCell.Offset(0, 2).Value = row

Any suggestions for a method that would be quicker?

Thanks,

Eric

Eric

Processing time to set values
 
I'll reply to my own question - the spreadsheet is pretty large, and it was
the automatic calculation that was slowing it down. Even though nothing was
based on the cells I was changing, I guess Excel has to check to make sure.
When I turned calculation to automatic, it went much more quickly.

Eric

"Eric" wrote:

Hi all,

I'm running a macro to set some values for a long list (18,000 entries) of
data. Everything is working fine, but I'm finding that Excel takes a long
time to enter the two new pieces of data that I'm telling it to. The
calculation happens almost right away, but printing the results takes about a
second. I've tried two ways, and they both take about the same amount of
time. Here's what I've tried:

ActiveSheet.Range("AF" & activerow) = TimeBack
'ActiveCell.Offset(0, 1).Value = TimeBack
ActiveSheet.Range("AG" & activerow) = row
'ActiveCell.Offset(0, 2).Value = row

Any suggestions for a method that would be quicker?

Thanks,

Eric



All times are GMT +1. The time now is 12:08 AM.

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