ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Replace text in specific column (https://www.excelbanter.com/excel-programming/364627-replace-text-specific-column.html)

Gijs Breedveld

Replace text in specific column
 
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



Tom Ogilvy

Replace text in specific column
 
Sub ReplaceData()
Range("E2:E250").Replace _
What:="MAR", _
Replacement:="MRT", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, _
MatchCase:=False
End Sub

--
Regards,
Tom Ogilvy


"Gijs Breedveld" wrote in message
...
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





Nick Hodge

Replace text in specific column
 
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
HIS


"Gijs Breedveld" wrote in message
...
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





Gary''s Student

Replace text in specific column
 
Sub Macro1()
Range("E2:E250").Select
Selection.Replace What:="MAR", Replacement:="MRT"
End Sub

--
Gary's Student


"Gijs Breedveld" wrote:

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



Gijs Breedveld

Replace text in specific column
 
This really worked.

Thanks.

Regards,

Gijs Breedveld

"Tom Ogilvy" wrote:

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

--
Regards,
Tom Ogilvy


"Gijs Breedveld" wrote in message
...
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






Gijs Breedveld

Replace text in specific column
 
This also works great.

Thanks,

Regards,

Gijs Breedveld

"Nick Hodge" wrote:

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
HIS


"Gijs Breedveld" wrote in message
...
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






Gijs Breedveld

Replace text in specific column
 
This also works great.

Thanks,

Regards,

Gijs Breedveld


"Gary''s Student" wrote:

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

--
Gary's Student


"Gijs Breedveld" wrote:

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




All times are GMT +1. The time now is 03:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com