So I am looking in column I for partial texts. For instance Column I can say:
"Health Care, Doctor J"
"Formula 1 Driver Ayrton Senna"
"Dog Toys"
My VBA is looking for a specific partial string in column I and then putting another specific text in Column L. So the one I have written here says if the words health care are in a cell in column I, then the corresponding cell in Column L will now say "Yes, Healthcare" in bold letters.
For Each c In Range("I3:I100")
If InStr(1, LCase(c.Value), "health care") > 0 Then
With Cells(c.Row, lastcol)
.Value = "Yes, Healthcare"
.Font.Bold = True
End With
Else
With Cells(c.Row, lastcol)
.Font.Bold = False
.ClearContents
End With
End If
What I want to do is add another part to this vba that looks for the words "Formula 1" and will write, "Yes, Formula 1" in the corresponding cell in column L. Exactly the same as the healthcare one above, just with these new parameters. How would I go about doing this?
"Health Care, Doctor J"
"Formula 1 Driver Ayrton Senna"
"Dog Toys"
My VBA is looking for a specific partial string in column I and then putting another specific text in Column L. So the one I have written here says if the words health care are in a cell in column I, then the corresponding cell in Column L will now say "Yes, Healthcare" in bold letters.
For Each c In Range("I3:I100")
If InStr(1, LCase(c.Value), "health care") > 0 Then
With Cells(c.Row, lastcol)
.Value = "Yes, Healthcare"
.Font.Bold = True
End With
Else
With Cells(c.Row, lastcol)
.Font.Bold = False
.ClearContents
End With
End If
What I want to do is add another part to this vba that looks for the words "Formula 1" and will write, "Yes, Formula 1" in the corresponding cell in column L. Exactly the same as the healthcare one above, just with these new parameters. How would I go about doing this?