Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default adding colors, patterns, comments to large spreadsheets in bulk

Never looked at vba/excel before, but was able to reduce run time on an app
by 75% via recorset streamlining.

Still not happy with run times, learned that manipulation of cells is
consuming most of the other 25%.

Learned that perhaps adding values in bulk to spreadsheet (rather than one
by one) would probably improve performance drastically.

So I'm wondering if the pretty substantial color, pattern and comment
manipulation we're also doing can somehow be applied in bulk, perhaps from an
array or similar workaround?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default adding colors, patterns, comments to large spreadsheets in bulk

Have a look at this sample code from Dave Peterson.

Sub ColorFormulas2()
'work on an entire range without For Each.........Next
Dim rng As Range

Set rng = Nothing
On Error Resume Next 'just in case there are no formulas
Set rng = Cells.SpecialCells(xlCellTypeFormulas)
On Error GoTo 0

If rng Is Nothing Then
'do nothing
Else
rng.Interior.Color = vbYellow
End If
End Sub


Gord Dibben MS Excel MVP

On Wed, 9 Apr 2008 05:58:04 -0700, DB042188
wrote:

Never looked at vba/excel before, but was able to reduce run time on an app
by 75% via recorset streamlining.

Still not happy with run times, learned that manipulation of cells is
consuming most of the other 25%.

Learned that perhaps adding values in bulk to spreadsheet (rather than one
by one) would probably improve performance drastically.

So I'm wondering if the pretty substantial color, pattern and comment
manipulation we're also doing can somehow be applied in bulk, perhaps from an
array or similar workaround?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default adding colors, patterns, comments to large spreadsheets in bul

I can give that a whirl but isnt the idea to source the color, pattern etc
decision from something not already in cells, which from my understanding is
the reason for poor performance in the first place?

What about comments, can I source them from an array similar to the way in
which I'll try to source values from an array?

"Gord Dibben" wrote:

Have a look at this sample code from Dave Peterson.

Sub ColorFormulas2()
'work on an entire range without For Each.........Next
Dim rng As Range

Set rng = Nothing
On Error Resume Next 'just in case there are no formulas
Set rng = Cells.SpecialCells(xlCellTypeFormulas)
On Error GoTo 0

If rng Is Nothing Then
'do nothing
Else
rng.Interior.Color = vbYellow
End If
End Sub


Gord Dibben MS Excel MVP

On Wed, 9 Apr 2008 05:58:04 -0700, DB042188
wrote:

Never looked at vba/excel before, but was able to reduce run time on an app
by 75% via recorset streamlining.

Still not happy with run times, learned that manipulation of cells is
consuming most of the other 25%.

Learned that perhaps adding values in bulk to spreadsheet (rather than one
by one) would probably improve performance drastically.

So I'm wondering if the pretty substantial color, pattern and comment
manipulation we're also doing can somehow be applied in bulk, perhaps from an
array or similar workaround?



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
Multiple Colors and/or Patterns in the Same Line billbrandi Charts and Charting in Excel 1 June 13th 09 07:50 AM
Comments at End of Large Table Stefani Excel Discussion (Misc queries) 3 December 28th 07 11:54 PM
Patterns in excel printing as solid colors (not as selected) Kenm Excel Discussion (Misc queries) 0 October 15th 07 12:57 AM
excel does not shows colors or patterns in screen, but will print confused without color Excel Discussion (Misc queries) 1 May 24th 07 04:15 AM
linking comments between spreadsheets BobbyVoom New Users to Excel 5 May 6th 06 11:23 PM


All times are GMT +1. The time now is 09:45 PM.

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

About Us

"It's about Microsoft Excel"