Excel to find a word within a cell within a sentance
Closed
MeNotYou
Posts
1
Registration date
Thursday October 24, 2013
Status
Member
Last seen
October 24, 2013
-
Oct 24, 2013 at 05:13 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Oct 25, 2013 at 09:48 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Oct 25, 2013 at 09:48 PM
Related:
- Excel to find a word within a cell within a sentance
- Number to word in excel - Guide
- How to search for a word within a website - Guide
- Word apk for pc - Download - Word processors
- How to insert a checkmark in word - Guide
- Number to text in word - Guide
4 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Oct 25, 2013 at 07:21 AM
Oct 25, 2013 at 07:21 AM
the three sentences are in A1,A2 and A3.
then try this macro
then try this macro
Sub test()
Dim x(1 To 4) As String, j As Integer, k As Integer
Dim r As Range, cfind As Range
Set r = Range(Range("A1"), Cells(Rows.Count, "A").End(xlUp))
x(1) = "fox"
x(2) = "quick"
x(3) = "dog"
x(4) = "lazy"
r.Font.Bold = False
For j = 1 To 4
Set cfind = r.Cells.Find(what:=x(j), lookat:=xlPart)
If Not cfind Is Nothing Then
k = WorksheetFunction.Search(x(j), cfind)
'MsgBox k
cfind.Characters(k, Len(x(j))).Font.Bold = True
End If
Next j
End Sub
OK, need a little more help. It doesn't quite work with my change to a couple parts...
The column I need to work with is D from D2 and down since D1 is the Header Row, entire column, and the column will vary in entries from day to day.
I can only get it to search down to row 6 in column D.
Also, bold is good but not enough. I need it to BOLD and RED COLOR each time.
The column I need to work with is D from D2 and down since D1 is the Header Row, entire column, and the column will vary in entries from day to day.
I can only get it to search down to row 6 in column D.
Also, bold is good but not enough. I need it to BOLD and RED COLOR each time.
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Oct 25, 2013 at 09:48 PM
Oct 25, 2013 at 09:48 PM
not clear. copy your sheest if it is not large or upload to speedyshare.com and post the download address.
reg font and red just add one more code statement
instead of
cfind.Characters(k, Len(x(j))).Font.Bold = True
try this
wih cfind.characters(k,len(x(j))).font
.bold=true
.colorindex=3
end with
reg font and red just add one more code statement
instead of
cfind.Characters(k, Len(x(j))).Font.Bold = True
try this
wih cfind.characters(k,len(x(j))).font
.bold=true
.colorindex=3
end with