![]() |
|
|
|
#1
|
|||
|
|||
|
This macro, gives the same results as NBVC's formula from post 10 (except the #N/A is left blank) Code:
Sub FirstBeadType()
Dim listRng As Range, cel As Range
Dim i As Long, lr As Long
With Sheets("BeadTypes")
Set listRng = .Range("A2", .Range("A" & .Rows.Count).End(xlUp))
End With
With Sheets("Description")
lr = .Range("D" & .Rows.Count).End(xlUp).Row
For Each cel In listRng
For i = 2 To lr
If .Cells(i, "A") = "" And InStr(1, .Cells(i, "D"), cel.Value, vbTextCompare) > 0 Then
.Cells(i, "A") = cel.Value
End If
Next i
Next cel
End With
End Sub
|
|
#2
|
|||
|
|||
|
Both of these work perfectly! Thank you so much!
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to find (highlight) two and more words in a list of 75k single words in Word 2010 | Usora | Word | 8 | 05-29-2018 03:34 AM |
Wildcard replace any string in context with a specified string
|
wardw | Word | 7 | 05-07-2018 09:13 AM |
How can I compare a string in a cell to another string?
|
Amitti | Word VBA | 2 | 04-10-2017 07:35 PM |
| How to find all string within string. | PRA007 | Word VBA | 18 | 02-12-2016 08:11 PM |
Way to search for a string in text file, pull out everything until another string?
|
omahadivision | Excel Programming | 12 | 11-23-2013 12:10 PM |