Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Find & Replace Macro from external spreadsheet/db?

Hello.

I currently have a Macro which replaces numbers in all cells in column
A from row 3 onwards with different numbers.

I would like to change the Macro so that instead of having all the
replacements within the macro itself, it instead takes them from
another Spreadsheet called numberchanges.xls on drive C. It would be
a lot easier for me to maintain and update this way.

I need a little help with making this Macro though as I'm not an
expert with this sort of stuff.

Below shows three lines of the present Macro and the replacements it
makes:

Columns(1).Replace What:="1143", Replacement:="7945",
LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False

Columns(1).Replace What:="6762", Replacement:="4760",
LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False

Columns(1).Replace What:="70775", Replacement:="90001",
LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False

In the numberchanges.xls file I have this information in columns A and
B from row 3 onwards.

So 1143 is in cell A3 and it's replacement 7945 is in cell B3 and so
on until the last value.

How would I go about making the macro so that it opens the
numberchanges file and makes the replacements in the current document?

Would it be easier if I made an Access database file for it to find
and replace the data from? Or would you be able to do it via some
sort of query?

Cheers for any help

John


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
Find/Replace External Data Web Query Gary Spranger Excel Worksheet Functions 3 July 4th 07 06:40 PM
Find/Replace - Full Navigation of Spreadsheet JennyW Excel Discussion (Misc queries) 2 May 22nd 06 11:59 PM
find&replace macro Elainey Excel Worksheet Functions 0 January 6th 06 09:20 PM
How do I find and replace a symbol in an excel spreadsheet John C Excel Discussion (Misc queries) 1 June 23rd 05 12:58 AM
find and replace macro need help excelguru Excel Programming 3 April 30th 04 04:26 AM


All times are GMT +1. The time now is 04:36 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"