Search : in
By :

A macro problem, find and replace

Last answer on Apr 6, 2009 9:37:05 am BST Vincent, on Apr 6, 2009 3:52:33 am BST 
 Report this message to moderators

Hello,
I have a macro which contains the following procedure:

Range("D210:D219,Z210:AA219").Select
Range("Z210").Activate
Application.CutCopyMode = False
Selection.Copy
Windows("test.xls").Activate
Range("D11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True

Range("D286:D295,Z286:AA295").Select
Range("Z286").Activate
Application.CutCopyMode = False
Selection.Copy
Windows("test.xls").Activate
Range("D17").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True



How can I use the Find and replace function in visual basic editor so that in the first line (e.g. Range("D210:D219,Z210:AA219").Select ) the letter "D" can be replaced with "B"
without changing the no. and the other text which contains a letter "D". I would like the procedure to be as follows after replacement:

After modification:

Range("B210:B219,Z210:AA219").Select
Range("Z210").Activate
Application.CutCopyMode = False
Selection.Copy
Windows("test.xls").Activate
Range("D11").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True

Range("B286:B295,Z286:AA295").Select
Range("Z286").Activate
Application.CutCopyMode = False
Selection.Copy
Windows("test.xls").Activate
Range("D17").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True

Thanks a lot
Vincent

Configuration: Windows XP
Firefox 3.0.3

Best answers for « A macro problem, find and replace » in :
[VBA] Deleting a word in a range of cell Show[VBA] Deleting a word in a range of cell In the case you want to delete a word in a sentence, just create a small macro that removes the word. But it will become difficult when you have word like, for example, "Theword" or "THEWORD" or...
Renaming multiple files in batch ShowRenaming multiple files in batch Native features Using a third-party program Renaming a large number of files can quickly become tedious. Fortunately, there are tools to automate this task in many cases: Native features On Windows...
The pictures taken from Skype can't be found ShowThe pictures taken from Skype can't be found Issue Solution Where are stored the pictures taken with Skype? Issue If you take a picture of one of your contacts during a video conversation on Skype and you can't find them....
Download LBE Find & Replace for MS Outlook ShowDescription The application is designed by Leigh Business Enterprises Ltd. LBE Find & Replace for MS Outlook is a tool that allows you to search and replace missing text in your contacts, emails, appointments and many more. Simple and easy to use,...
Download Advanced Find&Replace for Excel ShowDescription This application is designed by Add-in Express LTD. Advanced Find & Replace is an add-on for Microsoft Excel. It allows you to run multiple searches for values, formulas and comments. The search results are displayed in a floating...
EFQM - European Foundation for Quality Management ShowIntroduction to EFQM The EFQM (European Foundation for Quality Management) is a European foundation based in Brussels that was founded in 1988 by 14 European companies (Bosch, BT, Bull, Ciba-Geigy, Dassault, Electrolux, Fiat, KLM, Nestlé, Olivetti,...

1

 perham, on Apr 6, 2009 9:37:05 am BST
Reply to perham