Find/Replace - from old to new

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,
 
I

isabelle

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 :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top