Find/Replace - from old to new

  • Thread starter Thread starter learning_codes
  • Start date Start date
L

learning_codes

Hi,

I am reading and research how to make the vba code for the following:

#1

- Find/Replace on Column A
- I want to replace "Total" to "Division Total".


#2

I want to set a range on the line "Division Total from Column A to Column F and make it light grey shading on one row.

Your help would be great.

Thanks,
 
hi,

Range("A:A").Replace What:="Total", Replacement:="Division Total", LookAt:=xlWhole
If Not IsError(Application.Match("Division Total", Range("A:A"), 0)) Then
rw = Application.Match("Division Total", Range("A:A"), 0)
Range(Cells(rw, 1), Cells(rw, 6)).Interior.Color = RGB(200, 200, 200)
Else
MsgBox "there is no <Total> find"
End If

isabelle

Le 2014-07-25 21:24, (e-mail address removed) a écrit :
 
Back
Top