abitslow
Technical User
- Apr 25, 2003
- 44
Hi there,
I am trying to write something that will look down a column and replace any instances of text such as "Gas show" with "Gas Show". (As I have to do this regularly and for a large number of text items I was trying not to use the Replace funtion in the menu but write a macro I can use every time.)
My attempt is:
Worksheets("Replace").Columns("A").Replace(What:="Gas shows",Replacement:="Gas Shows",SearchOrder:=xlByColumns,MatchCase:=True)
but it doesn't work. Where am I going wrong?
Many thanks in advance.
Matt.
I am trying to write something that will look down a column and replace any instances of text such as "Gas show" with "Gas Show". (As I have to do this regularly and for a large number of text items I was trying not to use the Replace funtion in the menu but write a macro I can use every time.)
My attempt is:
Worksheets("Replace").Columns("A").Replace(What:="Gas shows",Replacement:="Gas Shows",SearchOrder:=xlByColumns,MatchCase:=True)
but it doesn't work. Where am I going wrong?
Many thanks in advance.
Matt.