Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default cannot make the excel fill in/delete cells fast

Hi,
I have problems with filling in/deleting the cells in some 6 sheets workbook.
It should be a excel based tool for simple financial analysis.
There are P&L statement, Balance sheet, Cash-flow statement, Ratios, etc. in
respective worksheet.

There is a specific structure of input cells in each worksheet (about 1000
cells). In array PL, there are the numbers rows. In array NMonths, there are
number of columns.
--------------------------------------------------------------------------
Dim NMonths(1 To 24) As Integer....there are 24 collumns

PL(1) = 5
PL(2) = 6
PL(3) = 10
....................
...........-in array PL, there are numbers of rows

NMonths(1) = 6
NMonths(2) = 7
NMonths(3) = 8
....................
...........-in array NMonths, there are numbers of collumns


Than, in a loop, I am trying to fill in/delete the cells.

For col = 1 To 24
For ro = 1 To 45
Worksheets(2).Cells(PL(ro), NMonths(col)) = PLdata(col,ro)
Next ro
Next col

------------------------------------------------------------------
It works very slowly - mentioned loop lasts about 1 minute - on normally
very fast computers.

Are there any other faster ways of referencing cells or what would be the
most efficient solutions for of filling in/deleting this amount of not
neighbouring cells?

Thanks for your help!

Johny B.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default cannot make the excel fill in/delete cells fast

Hi Johny B,

Aside from any consideration of your code, try a structure something like:

Sub AAA()
'Your Dim statements

With Application
CalcMode = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With

'Your processing code

With Application
.Calculation = CalcMode
.ScreenUpdating = True
End With

End Sub

---
Regards,
Norman



"Johny B." .(bez_spamu) wrote in message
...
Hi,
I have problems with filling in/deleting the cells in some 6 sheets
workbook.
It should be a excel based tool for simple financial analysis.
There are P&L statement, Balance sheet, Cash-flow statement, Ratios, etc.
in
respective worksheet.

There is a specific structure of input cells in each worksheet (about 1000
cells). In array PL, there are the numbers rows. In array NMonths, there
are
number of columns.
--------------------------------------------------------------------------
As Integer....there are 24 collumns

PL(1) = 5
PL(2) = 6
PL(3) = 10
...................
..........-in array PL, there are numbers of rows

NMonths(1) = 6
NMonths(2) = 7
NMonths(3) = 8
...................
..........-in array NMonths, there are numbers of collumns


Than, in a loop, I am trying to fill in/delete the cells.

For col = 1 To 24
For ro = 1 To 45
Worksheets(2).Cells(PL(ro), NMonths(col)) = PLdata(col,ro)
Next ro
Next col

------------------------------------------------------------------
It works very slowly - mentioned loop lasts about 1 minute - on normally
very fast computers.

Are there any other faster ways of referencing cells or what would be the
most efficient solutions for of filling in/deleting this amount of not
neighbouring cells?

Thanks for your help!

Johny B.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make different cells fill in automatically from one entry? Coco212 Excel Worksheet Functions 3 January 4th 10 01:31 PM
Need a fast way to delete rows glenlee Excel Discussion (Misc queries) 1 September 23rd 05 03:33 AM
fast way to make reports from a database 71marco71[_6_] Excel Programming 0 February 5th 04 09:15 PM


All times are GMT +1. The time now is 02:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"