Hi, I currently have the following macro, but it errors out:
Sub test()
Dim rng As Range, c As Range, cfind As Range, rng1 As Range
Worksheets("mail_list2.4_2.5").Activate
Set rng = Range(Range("H2"), Range("H2").End(xlDown))
Set rng1 = Range(Range("L2"), Range("L2").End(xlDown))
For Each c In rng
Set cfind = rng1.Cells.Find(What:=c.Value, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False)
If Not cfind Is Nothing Then c.Interior.ColorIndex = 3
Next c
End Sub
I am trying to compare two columns of email addresses, column L has my range of address, and column H has the address I need to highlight, column H has cells that have multiple email address, so essentially, I need the macro to not match entire cell contents, just look within that cell for a possible matching email address within L and highlight the cell(in H). See below:
Column L:
| anthony.b@domain.com |
| April.T@domain.com |
| arthur.G@domain.com |
| Babette.A@domain.com |
| Barbara.E@domain.com |
| barbara.M@domain.com |
barton.B@domain.com
Column H:
|
| marjorie.p@domain.com;tony.p@domain.com;barton.b@domain.com |
| carol.m@domain.com; |
| charisma.s@domain.com;babette.a@domain.com |
| nikisha.c@domain.com; |
| david.f@domain.com;nancy.m@domain.com; |
| chris.l@domain.com; |
chris.l@domain.com;
Thanks in advance for any assistance, I've been struggling with this for quite a while.... =( |