Hi all,
I have been playing around with this for a bit and now have it sorted out. This is a macro that will check a name list and highlight any cell that contains one or more of the names.
Since writing it I found it quite usefull.
All you have to do is create a tab called "name list" and list all the names you are looking for in the Column A. Then on Sheet 1 column A have the data you are looking through.Code:Sub find_name() Dim name_list As Range, c As Range, d As Range, lookup_list As Range Worksheets("name list").Activate Set name_list = Range(Range("A2"), Range("A2").End(xlDown)) Worksheets("Sheet1").Activate Set lookup_list = Range(Range("A2"), Range("A2").End(xlDown)) For Each c In lookup_list For Each d In name_list If InStr(UCase(c.Value), UCase(d.Value)) Then c.Interior.ColorIndex = 6 Next d Next c End Sub
Hope this helps.![]()
Is this solved?
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Ya, I figured it out. Just wanted to post incase someone was looking for it. Sorry new here.
Okay, thanks..
In that case maybe better in the Tips/Tutorials forum
....moved.
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks