LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Find & Replace w/ name change

You said:
As simple as " ='[REPORT Jun 04.xls]Sheet 1'!A1".


Which is the formula to link to an open workbook.

So by being imprecise, you wasted a lot of time.

Indirect doesn't work with a closed workbook. You could write a UDF that
starts a new instance of excel, opens the workbook, extracts the data,
closes the workbook and closes the new instance of excel on each recalc of
each instance of the function.

Or you could write a macro that uses the workbook_open event to check the
link and change it when it doesn't match the current month.

--
Regards,
Tom Ogilvy


"ronbo" wrote in message
...

-----Original Message-----
If the workbook you are retrieving values from is always

open, you can use
indirect

=Indirect("'[Report " & Text(Date(Year(today()),Month

(Today())-1,1),"mmm
yy") & ".xls]Sheet1'!A1")

--
Regards,
Tom Ogilvy

"ronbo" wrote in

message
...
I have a workbook that I use month to month

named "Report
MTH YY" This month the report is named "Report Jul 04".
Next month the report will be renamed "Report Aug 04",
then "Report Sep 04" etc.

I have formulas that reference last months report. As
simple as " ='[REPORT Jun 04.xls]Sheet 1'!A1". Next
month in "Report Aug 04" I want the formula to

reference
the Jul report i.e. ='[REPORT Jul 04.xls]Sheet 1'!A1" .

I am looking for a way to automate the process rather
than manually using "Find & Replace", but I do not know
how to get the month names to change automatically.

Thanks for any help.




.
Thanks for the help. However, the previous workbook is

never opened with the new month. Is is in the same
directory. Any other ideas???




 
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
How do I change the color coding with Find & Replace? JimG Excel Discussion (Misc queries) 2 February 11th 09 12:33 AM
Change Default Setting-Find & Replace-How? Roy Sprunger Excel Discussion (Misc queries) 7 February 17th 08 06:19 PM
why can't I change the date with find and replace in this formula MLTDebbie Excel Worksheet Functions 0 January 30th 08 08:52 PM
Change Excel Find & Replace Options Defaults Rocky Lane Excel Discussion (Misc queries) 1 March 29th 06 03:39 PM
Find and replace of word causes change of font formatting jwa90010 New Users to Excel 4 July 22nd 05 08:10 PM


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