![]() |
Search for Values part2
Somehow my question got changed?
I like to thank the Big Guns (developers) for their answer but May I offer a more humble solution. I doesn't work properly, so if someone could look at it I would appreciate it. '-------------------------------------------------------------------- Sub Macro1Find() 'Clear the current range Range("B1:F6").Select Selection.Interior.ColorIndex = xlNone For i = 1 To 10 ' Look at values in A1 to A10 Lookupvalue = Cells(i, 1).Value With Range("B2:F6") Set C = .Find(Lookupvalue, LookIn:=xlValues) If Not C Is Nothing Then '(if match then highlight the cell in range} Range(C.Address).Select With Selection.Interior .ColorIndex = 39 .Pattern = xlSolid End With End If End With Next End Sub '------------------------------------------------------------------------ |
Search for Values part2
Thanks Nigel,
I don't know what happen! Your solution works great. When I tried my original solution; it also worked. Thanks, your method is more elegant. Thanks again |
All times are GMT +1. The time now is 07:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com