Replace text in specific column

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am trying to write a macro that replaces the word MAR into MRT for column
E and in the range 2:250

Doe sanyone has that code for me?

It would help me very much.

Best regards, Gijs
 
Sub ReplaceData()
Range("E2:E250").Replace _
What:="MAR", _
Replacement:="MRT", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
End Sub
 
Gijs

Try this

Sub ReplaceMAR()
Range("E2:E250").Replace What:="MAR", Replacement:="MRT"
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
(e-mail address removed)
 
Sub Macro1()
Range("E2:E250").Select
Selection.Replace What:="MAR", Replacement:="MRT"
End Sub
 

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

Back
Top