Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Lewis Evans   on Dec 15 In MS Office Category.

  
Question Answered By: Charlotte Brown   on Dec 15

I found this code on ozgrid.com, it looks like what you are looking
for. This code finds each instance of the word "Cat" in column A and
sets the font to Bold. It should be easy for you to adapt this to
search for a date  in column B and insert  a row. You might have to
change the loop to step backwards.

Sub BoldCat()
Dim iLoop As Integer
Dim rNa As Range
Dim i As Integer

iLoop = WorksheetFunction.CountIf(Columns(1), "Cat")
Set rNa = Range("A1")

For i = 1 To iLoop
Set rNa = Columns(1).Find(What:="Cat", After:=rNa, _
LookIn:=xlValues, LookAt:=xlWhole, _
SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=True)
rNa.Font.Bold=True

Next i

End Sub

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Find a date over & over Or get search suggestion and latest updates.


Tagged: