Macro to replace part of a formula

Pedro Morais

Board Regular
Joined
Dec 5, 2007
Messages
90
Hey guys,

I'm trying to create a macro to replace a link on a formula.
The formula is as below
='[Players Report 31121999.xls]Player1'!$AK$23

Where 31121999 is the date. there's a workbook everyday with different sheets for every player
I want to have a macro that gets the date I inputed in another cell and changes the date in the formula I displayed above (just changing the date).
Do you guys think thats possible?

Cheers
Pedro
 
Not sure what the * is for. Is that the ' equivalent outside of the US Version of Excel maybe?
 
Upvote 0
So what do you see if you type <ul>[*]="'[Players Report " & A1 & ".xls]Player1'!$AK$23"[/list]into a cell?
 
Upvote 0
:huh: Hmmmm :huh:

OK... let's try this. How 'bout if you type <ul>[*]="Hi " & A1[/list] into a cell? Do you get <ul type=square>[*]Hi 31121999[/list]
 
Upvote 0
OK... step 2... try<ul>[*]="'[Players Report " & A1 [/list] into a cell? Do you get <ul type=square>[*]'[Players Report 31121999[/list]
 
Upvote 0
wrapping it up:

if I type

="'Players Report " & A1 & ".xls]Player1'!$AK$23"
I get: 'Players Report 23112007.xls]Player1'!$AK$23

If I add to that
=INDIRECT ("Players Report " & A1 & ".xls]Player1'!$AK$23")
i get: REF
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top