Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
A Macro to Do Find and Replace
Hi All, I am writing a macro in Excel 2002 to scan through
a large volume of Excel files trying to find an old Website name and replace them all with a new one. Manually, i would go to Excel's VB Editor and go to the Toolbar to select the Find and Replace All function for each file. In this macro, how do i call the built- in "Find" function and automate this process that is able to update multiple files in one shot? Thanks all in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
A Macro to Do Find and Replace
Eric,
It wouldn't all be in one shot. Firstly you would have to find a way of identifying all of the files, it could be all files in a directory, or you could manually build an array. Whatever, once you have the list, you would open each in turn, iterate through each sheet, do the Find/Replace, save and close the workbook, and move on. You could do a macro record of the Find/Replace to get the basic syntax. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Eric" wrote in message ... Hi All, I am writing a macro in Excel 2002 to scan through a large volume of Excel files trying to find an old Website name and replace them all with a new one. Manually, i would go to Excel's VB Editor and go to the Toolbar to select the Find and Replace All function for each file. In this macro, how do i call the built- in "Find" function and automate this process that is able to update multiple files in one shot? Thanks all in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
A Macro to Do Find and Replace
Hello Bob/Everybody,
Could you pls give details for generating that macro? I tried, but nothing was actually recorded. I serached through Excel VB help, but only found FileSearch, not text search in the VB Editor. Thanks! Eric -----Original Message----- Eric, It wouldn't all be in one shot. Firstly you would have to find a way of identifying all of the files, it could be all files in a directory, or you could manually build an array. Whatever, once you have the list, you would open each in turn, iterate through each sheet, do the Find/Replace, save and close the workbook, and move on. You could do a macro record of the Find/Replace to get the basic syntax. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Eric" wrote in message ... Hi All, I am writing a macro in Excel 2002 to scan through a large volume of Excel files trying to find an old Website name and replace them all with a new one. Manually, i would go to Excel's VB Editor and go to the Toolbar to select the Find and Replace All function for each file. In this macro, how do i call the built- in "Find" function and automate this process that is able to update multiple files in one shot? Thanks all in advance. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and replace macro | Excel Discussion (Misc queries) | |||
Macro to Find & Replace | Excel Worksheet Functions | |||
Macro: Find and replace | Excel Discussion (Misc queries) | |||
find&replace macro | Excel Worksheet Functions | |||
Using Find & Replace in macro | Excel Programming |