+ Reply to Thread
Results 1 to 3 of 3

Copy text from formula and paste as external reference in VBA

  1. #1
    Registered User
    Join Date
    12-08-2014
    Location
    Poland
    MS-Off Ver
    2013
    Posts
    87

    Copy text from formula and paste as external reference in VBA

    Hi,

    I would like to ask for help in creating a macro that will copy text from the formula (which creates the path of external reference) and paste it in another cell as an active external reference. When recording a macro, this will be something like this
    Please Login or Register  to view this content.
    but with dynamic change of parts 'J:\folder\[file.xlsx]k'!R22C39 comes from cell formula.

    Thanks in advance !

    Paul

  2. #2
    Registered User
    Join Date
    12-08-2014
    Location
    Poland
    MS-Off Ver
    2013
    Posts
    87

    Re: Copy text from formula and paste as external reference in VBA

    Why something like this does not works?

    Please Login or Register  to view this content.
    when Range("F7") is text 'J:\folder\[file.xlsx]k'!R22C39

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Copy text from formula and paste as external reference in VBA

    The leading apostrophe in the cell will be seen as a text formatting indicator and not as part of the cell value, so you'd need:

    Please Login or Register  to view this content.
    Rory

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 08-15-2019, 02:48 PM
  2. What's faster? Formula's linked to external sheets or copy/paste via VBA?
    By anon in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-27-2019, 01:04 PM
  3. Replies: 6
    Last Post: 10-12-2016, 09:34 AM
  4. Replies: 6
    Last Post: 09-21-2015, 12:59 PM
  5. vba: copy paste formula (cant solve relative reference )
    By DavidRoger in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-21-2014, 02:11 AM
  6. Replies: 7
    Last Post: 11-12-2012, 02:46 PM
  7. Replies: 0
    Last Post: 05-24-2011, 12:33 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1