Hi,
Routine below
overwrites the values on top of each other and only the last value from "A1:F17" is shown in "M2". How do I modify it so it writes all the values in "M2" separated by a dash or space? or maybe show it in column M.
Thank you again.
Thank you for your help.
Routine below
Code:
Range("M2").Value = i.Value
Thank you again.
Code:
Sub Compare2A()
Dim LstRw As Long, c As Range, i As Range
Application.ScreenUpdating = False
LstRw=Cells.Find(What:="*",SearchOrder:=xlRows, SearchDirection:=xlPrevious,
LookIn:=xlValues).Row
For Each c In Range("A1:F17")
For Each i In Range("K1:K" & LstRw)
If c.Value = i.Value Then
c.Interior.ColorIndex = 6
Range("M2").Value = i.Value
End If
Next i
Next c
Application.ScreenUpdating = True
End Sub
Thank you for your help.