Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I use several Do Loops or For Next loops with If statements within my macros. In most cases it will look through 2K rows before quitting. One example is the one below, which hides rows based on certain color requirements. The ColorIndex statement is referencing another function for the certain color. Is there a faster method to loop through data, such as this? Many of my macros have gotten very slow. Range("b8").Select Do If ActiveCell.Font.ColorIndex = -4105 Then If ActiveCell.Value = "" And ActiveCell.Offset(-1, 0).Font.Bold = True Then ActiveCell.Offset(1, 0).Select Else ActiveCell.EntireRow.Hidden = True ActiveCell.Offset(1, 0).Select End If Else If ActiveCell.Font.Bold = True Then Else ActiveCell.Offset(0, 14).Value = Round(((Cells(ActiveCell.row, 15).Value) / 1000000), 1) End If ActiveCell.Offset(1, 0).Select End If Loop Until ActiveCell.Value = "" And ActiveCell.Offset(-1, 0).Value = "" And ActiveCell.Offset(-2, 0).Value = "" And ActiveCell.Offset(-3, 0).Value = "" And ActiveCell.Offset(-4, 0).Value = "" And ActiveCell.Offset(-5, 0).Value = "" |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA Speed up | Excel Discussion (Misc queries) | |||
Can you speed UP drag speed? | Excel Discussion (Misc queries) | |||
I need mor Speed!!!! | Excel Discussion (Misc queries) | |||
need for speed! | Excel Programming | |||
Speed? | Excel Programming |