A formula question

kluitna

Board Regular
Joined
Mar 10, 2002
Messages
75
does anyone out here know how to put a variable into a linked formula?

Eaxample:

ActiveCell.FormulaR1C1 = _
"=+'[Estimate Source New Item 1.xls]Estimate (1)'!R9C3"

what I want to be able to do is reference different file names in to link the cells together from workbook to workbook.

Any one have any ideas?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
if you will use VBA to change formula then it is just like you wrote:

strfile="[Estimate Source New Item 1.xls]"
ActiveCell.FormulaR1C1 ="='" & strfile & "Estimate (1)'!R9C3"

isn't it?

regards
suat
 
Upvote 0
You are right, thanks allot.. opened my eyes a bit there. New to VBA so I am struggling with the code.
 
Upvote 0
Nice to hear that it is working.

You can visit http://www.thewordexpert.com for VBA and office applications help if you need. Subscribe for newsletter then you can follow our VBA Functions in Excel articles series, first newsletter will be posted in a few days.

Suat
This message was edited by smozgur on 2002-03-14 13:01
 
Upvote 0

Forum statistics

Threads
1,213,535
Messages
6,114,198
Members
448,554
Latest member
Gleisner2

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