LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default in a macro how to make a part of the formula a variable

I am trying to copy a cell from one file into another file in a macro. There
are hundreds of files all linking to the same cell so I thought I would set
the formula up so that is has a variable for the filename but I can't figure
out the syntax. The formula should link to cell $r$16 in worksheet
"monthly" in the changing file name and the variable I used for the
changing file name is budget_file. The following didn't work. Can someone
tell me how to do this?


ActiveCell.FormulaR1C1 = "=" & budget_file & 'monthly'!$r$16"

--
Celia
 
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
Making part of a formula a variable Will Fleenor Excel Worksheet Functions 2 August 14th 09 01:19 PM
Help make a macro variable Brad Excel Discussion (Misc queries) 3 March 10th 08 07:58 PM
Formula expected end of statement error, typing formula into cell as part of VBA macro [email protected] Excel Programming 1 July 20th 06 07:58 PM
how do i make one part of my formula bold and the other normal? niquey Excel Worksheet Functions 6 March 27th 06 03:22 PM
how to make macro not dependent on datafile which has date as its part. haisat Excel Programming 2 October 18th 03 12:14 PM


All times are GMT +1. The time now is 08:29 AM.

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"