Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Below is the code that Nigel helped me with. Is there anyway to make this a
loop instead of this long code? Thanx Todd If Application.CountIf(Range("IV1:IV100"), Range("V4")) 0 Then Range("area22").Interior.ColorIndex = Range("IV1").Interior.ColorIndex Else Range("area22").Interior.ColorIndex = 2 End If If Application.CountIf(Range("IV1:IV100"), Range("W4")) 0 Then Range("area23").Interior.ColorIndex = Range("IV1").Interior.ColorIndex Else Range("area23").Interior.ColorIndex = 2 End If If Application.CountIf(Range("IV1:IV100"), Range("X4")) 0 Then Range("area24").Interior.ColorIndex = Range("IV1").Interior.ColorIndex Else Range("area24").Interior.ColorIndex = 2 End If If Application.CountIf(Range("IV1:IV100"), Range("Y4")) 0 Then Range("area25").Interior.ColorIndex = Range("IV1").Interior.ColorIndex Else Range("area25").Interior.ColorIndex = 2 End If If Application.CountIf(Range("IV1:IV100"), Range("Z4")) 0 Then Range("area26").Interior.ColorIndex = Range("IV1").Interior.ColorIndex Else Range("area26").Interior.ColorIndex = 2 End If |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with creating a loop | Setting up and Configuration of Excel | |||
creating a loop | Excel Discussion (Misc queries) | |||
Creating a loop | Excel Discussion (Misc queries) | |||
Need help creating Loop | Excel Discussion (Misc queries) | |||
Loop for VBA code? | Excel Worksheet Functions |