help on inner loop 2nd request

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have one string in each cell in column R. I want to compare it with each
string in column J and mark it red and copy it to the clipboard. There are
one or more strings in each cell in column J separated by commas. this is
urgent! tia,


Dim ColumnJ As Range
Dim ColumnR As Range
StringToSearch As String

I As Integer
C As Cell

Set J = ActiveSheet.Range("J2:end.xl(down)")

Set R = ActiveSheet.Range("R2:end.xl(down)")


I = 2

For Each C In ColumnR

'compare cell in ColumnR with each string in columnJ deliminated by commas
Set C = ("R" & I)


'compare cell in ColumnR with each string in ColumnJ
For Each StringToSearch In ColumnJ
Set StringToSearch = XXXXX
If StringToSearch = C Then

'if it matches color font red
C.Font.ColorIndex = 3
copy string to search
Else
Next




End If
I = I + 1


Next
 
Back
Top