LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default how do I programatically edit formulae in MS Excel?

You could do something like this: I assumed all your links are on one sheet:

Sub Macro1()

Dim myRep As String
Dim myFind As String

myFind = InputBox("What month string to replace?")
myRep = InputBox("Replace it with?")

Cells.Replace What:=myFind, Replacement:=myRep, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub

Answer Jan to the first, and Feb to the second....

HTH,
Bernie
MS Excel MVP


"Don Haworth" wrote in message
...
In MS EXcel 2003, I have a master workbook with 5 feeder workbooks to enable
a city manager to collect monthy returns from 5 area managers. So in Jan '06
I have CityJan06.xls with many links to NJan06.xls, SJan06.xls, NWJan06.xls,
EJan06.xls and NEJan06.xls. When all the Jan feeders are complete, I want to
programatically copy all 6 workbooks into February's locations with Feb's
dates on the sheets (this I can do) and then edit the links in the Feb master
workbook to point to the new Feb feeders(which I haven't figured out yet).
So, one link in the master wkbk might be"=G:\CSSN06\NJan06\NJan06.xls" and in
the February copy I want to change that programatically to
"-G:\CSSN06\NFeb06\NFeb06.xls". At this stage, I'm not bothered about the
year change in Dec. Everything else in the link stays the same except for the
3-character month name
--
Don Haworth



 
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
Formulae: Paste value formulae after doing an average operation Lim Excel Discussion (Misc queries) 4 April 20th 08 07:31 PM
Creating a new excel file programatically Chimanrao Excel Programming 4 September 23rd 05 07:13 AM
Why can't I edit my excel document? Edit buttons shaded. Arl @ CBC New Users to Excel 3 September 7th 05 01:18 AM
Searching TEXT in formulae, rather than results of formulae AndyE Excel Worksheet Functions 1 July 15th 05 10:57 AM
[XL] Edit Mode of formulae should be improved in legibility. L.A. Slingerland Excel Worksheet Functions 0 July 8th 05 09:32 AM


All times are GMT +1. The time now is 06:43 PM.

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

About Us

"It's about Microsoft Excel"