Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 08-08-2019, 06:29 AM
NoSparks NoSparks is offline Looking for certain words in a string Windows 7 64bit Looking for certain words in a string Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

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
Reply With Quote
 



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
Looking for certain words in a string Wildcard replace any string in context with a specified string wardw Word 7 05-07-2018 09:13 AM
Looking for certain words in a string 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
Looking for certain words in a string 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

Other Forums: Access Forums

All times are GMT -7. The time now is 08:12 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft