A formula question
VBA Telemetry pings you when your VBA projects fail
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: A formula question

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    75
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    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?

  2. #2
    BatCoder
    Join Date
    Feb 2002
    Location
    Turkey
    Posts
    799
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    75
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You are right, thanks allot.. opened my eyes a bit there. New to VBA so I am struggling with the code.

  4. #4
    BatCoder
    Join Date
    Feb 2002
    Location
    Turkey
    Posts
    799
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    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 ]

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com