Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've been given a workbook that creates reports and asked
if I can make it run faster. I've managed to get it down from 1 hour and 40 minutes running time to just under 20 minutes just by cleaning up the code. I imagine they'd be jumping for joy just at 20 minutes, but I want more! Part of the code creates a new worksheet, dumps data from an ADO recordset into the sheet, then color codes a column of values based on the value in the cell. There are six different colors that it could be. The only slow part left of the entire thing is this cycling cells and coloring based on values. Currently it is something like this: For each Cell in mySheet.Range("A2:A" & mySheet.Range ("A65536").End(xlUp).Row Select Case Cell.Value Case "ValueA" Cell.Interior.ColorIndex = 13 Case "ValueB" Cell.Interior.ColorIndex = 5 Case "ValueC" Cell.Interior.ColorIndex = 10 Case "ValueD" Cell.Interior.ColorIndex = 6 Case "ValueE" Cell.Interior.ColorIndex = 45 Case Else Cell.Interior.ColorIndex = 3 End Select Next Cell Is there a faster way? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I make a graph with 2-cycle X 3-cycle log-log graph paper? | Charts and Charting in Excel | |||
Cycle Times | Excel Worksheet Functions | |||
cycle time | Charts and Charting in Excel | |||
How do I keep result from 1 iteration cycle to use in next cycle? | Excel Discussion (Misc queries) | |||
Can faster CPU+larger/faster RAM significantly speed up recalulati | Excel Discussion (Misc queries) |