Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default changing a function script

I need to run a macro that searches a range (column) that contains references
to another spread sheet in the function line e.g.,

='I:\REPORTS\Fairfield\[c_090204.xls]Route1'!$G14
The 090204 is yesterday's date.

I need to replace 090204 with 090304 (being today's date) in the reference
in all cells within the search range.

Can this be done automatically without prompting the user to enter the
values?
I have not been able to figure it out.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default changing a function script

Hi,
Menu Edit Links, do a Chnage Source.

Regards,
Sébastien

"GenerallyConfused" wrote:

I need to run a macro that searches a range (column) that contains references
to another spread sheet in the function line e.g.,

='I:\REPORTS\Fairfield\[c_090204.xls]Route1'!$G14
The 090204 is yesterday's date.

I need to replace 090204 with 090304 (being today's date) in the reference
in all cells within the search range.

Can this be done automatically without prompting the user to enter the
values?
I have not been able to figure it out.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default changing a function script

also, programmatically, if really needed:
ActiveWorkbook.ChangeLink Name:="I:\REPORTS\Fairfield\c_090204.xls", _
NewName:= "I:\REPORTS\Fairfield\c_090304.xls", _
Type:= xlExcelLinks

Regards,
Sebastien

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default changing a function script

Thanks again, I'll let you know after I test it tomorrow.

Jimmy

"sebastienm" wrote:

Hi,
Your dates are in the 'mmddyy' format, therefore something like:
Name:="I:\REPORTS\Fairfield\c_" & Format(date()-1, "mmddyy") & ".xls"
and
NewName:= "I:\REPORTS\Fairfield\c_" & Format(date(), "mmddyy") & ".xls"

(not tested though)
Regards,
Sebastien

"GenerallyConfused" wrote:

sebastienm, thank you very much for your post. It is quite helpful. Do you
know of any way to make the first date automatically run as yesterday's date,
and the second date automatically run as today's date without using a prompt
to have the current user enter the two dates manually. I have tried using
the "today" &
"today-1" functions, but they don't seem to work in the macro.

Thanks again for your help

jimmy

"sebastienm" wrote:

also, programmatically, if really needed:
ActiveWorkbook.ChangeLink Name:="I:\REPORTS\Fairfield\c_090204.xls", _
NewName:= "I:\REPORTS\Fairfield\c_090304.xls", _
Type:= xlExcelLinks

Regards,
Sebastien

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
DATE SCRIPT / add function col A, Nastech Excel Discussion (Misc queries) 2 September 24th 08 04:56 AM
Help needed (Automatic script function) Soul Excel Discussion (Misc queries) 5 January 10th 06 03:48 PM
Excel 2000/XP script to Excel97 script hat Excel Programming 3 March 2nd 04 03:56 PM
Script/function to extract duplicate entries between two columns? Jim Witte Excel Programming 1 January 27th 04 10:05 PM
Trying to create VBA script to run Report Manager function. Ken Berg Excel Programming 0 January 14th 04 09:30 PM


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