Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a string in each cell in column R. I want to see if there is a match
in each cell in column J. In column J there are one or more strings delimited by a comma. I am having trouble with the inner loop how to set the stringsearch. IF there is a match I want to mark it in red and copy it to a column in another sheet. tia, Sub SDelete() Dim ColumnJ As Range Dim ColumnR As Range Dim stringToSearch As String Dim I As Integer Dim 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 C.Copy Destination:=Worksheets("Sheet2").Range("5") Else Next End If I = I + 1 Next C End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Matching Two Text Strings to see if Like | Excel Worksheet Functions | |||
matching columns using text strings! | Excel Worksheet Functions | |||
How to check matching strings in 3 columns | Excel Discussion (Misc queries) | |||
Compare cells/columns and highlight matching text strings | Excel Worksheet Functions | |||
How can I compare a list of strings, allowing positive matching b. | Excel Programming |