help on inner loop 2nd request

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top