Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Multiple Edit Replaces

In Excel2000, I need to write a macro that will edit replace many
strings. We changed our account string and I need to replace at least
100 different strings. For example, 2010 becomes 4010, 3526 becomes
5513. I have about 100 of these changes that I want to put into a
macro so that when I run it in any workbook it makes all of these
changes Do I just keep using Edit-Replace or do I use Case . What is
the best way of doing this?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Multiple Edit Replaces

Edit - replace going through you list of replacements. Insure your
replacements are made so the string being replaced remains unique.


You can get the replace code using the macro recorder.
--
Regards,
Tom Ogilvy


"snax500" wrote:

In Excel2000, I need to write a macro that will edit replace many
strings. We changed our account string and I need to replace at least
100 different strings. For example, 2010 becomes 4010, 3526 becomes
5513. I have about 100 of these changes that I want to put into a
macro so that when I run it in any workbook it makes all of these
changes Do I just keep using Edit-Replace or do I use Case . What is
the best way of doing this?

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Multiple Edit Replaces

maybe u need not VBA ,u can enter a number that u want to plus(i.e.2000) in
a cell ,then COPY it-select the range ,choose PASTE SPECIAL--PLUS
that is all u can get it.

another for the vba code ,
Sub test4()
Dim mycell As Range
Application.ScreenUpdating = False
For Each mycell In ActiveSheet.UsedRange
mycell = mycell + 2000 'change as u shd plus number
Next mycell
Application.ScreenUpdating = True
End Sub


Hope this can be helpful
--
Regards,

Sebation.G
"snax500"
groups.com...
In Excel2000, I need to write a macro that will edit replace many
strings. We changed our account string and I need to replace at least
100 different strings. For example, 2010 becomes 4010, 3526 becomes
5513. I have about 100 of these changes that I want to put into a
macro so that when I run it in any workbook it makes all of these
changes Do I just keep using Edit-Replace or do I use Case . What is
the best way of doing this?

Thanks



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
replaces formula to its value InspectorJim Excel Worksheet Functions 1 May 13th 09 02:41 AM
Function that replaces Text in cell John[_116_] Excel Programming 9 March 28th 07 07:48 PM
Opening a second worksheet replaces the current doyle Excel Discussion (Misc queries) 1 February 12th 07 05:14 PM
Can I create Multiple passwords to edit multiple ranges? Conker10382 Excel Discussion (Misc queries) 8 December 31st 06 07:58 PM
How do you write an if statement that replaces #DIV/0! with 0 caliskier Excel Discussion (Misc queries) 6 March 10th 06 03:22 AM


All times are GMT +1. The time now is 09:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"