Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have one string in cell R I want to loop through all the cells in J and if
it finds it color it red. The problem is there could be one or two strings in J separated by a column. I think I have the first loop right but I don't know how to loop through the strings in J? tia, Dim ColumnJ As Range Dim ColumnR As Range StringToSearch As String I As Integer C As Cell Set ColumnJ = ActiveSheet.Range("J:end.xl(down)") Set ColumnR = ActiveSheet.Range("R:end.xl(down)") I = 2 For Each C In ColumnR C = ColumnR: I 'compare cell in ColumnR with each string in ColumnJ For each stringToSearch in Column J if stringToSearch = C 'if it matches color font red C.Font.ColorIndex = 3 Else Next End If I = I + 1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Naming Worksheets - Loop within a loop issue | Excel Programming | |||
Naming Worksheets - Loop within a loop issue | Excel Programming | |||
(Complex) Loop within loop to create worksheets | Excel Programming | |||
Advancing outer Loop Based on criteria of inner loop | Excel Programming | |||
Problem adding charts using Do-Loop Until loop | Excel Programming |