+ Reply to Thread
Results 1 to 2 of 2

Problem with concatenated formula linking to Share Point site

  1. #1
    Forum Contributor
    Join Date
    05-26-2004
    Location
    Halifax, UK
    MS-Off Ver
    Office 2016
    Posts
    260

    Problem with concatenated formula linking to Share Point site

    I'm trying to build a formula that reaches out to a separate workbook stored on a Share Point site on my company's Intranet. There are 3 cells with separate "bits" of the formula, which are:

    Cell A1 contains the link to the correct folder: 'https://mycompany.sharepoint.com/teams/PSPIs/Shared Documents/General/PSPI Feedback form

    Cell A2 contains the workbook name: TestWorkbook.xlsm

    Cell A3 contains the cell reference: $B$9

    Another cell concatenates all of these (and puts an "=" sign in front of it all) and would ideally return the value from cell $B$9 in the stated workbook. Changing the cell reference, workbook name etc would update the retrieved value in real time.

    However it doesn't work. I end up with a string that looks correct:
    ='https://mycompany.sharepoint.com/teams/PSPIs/Shared Documents/General/PSPI Feedback form/[TestWorkbook.xlsm]Sheet1'!$B$9

    However it doesn't actually retrieve any value, it just sits in the cell as though it's just text, as though it's not parsing the text as a formula. Weirdly, if I copy / paste values I end up with:

    ="="&$A$1&"/"&"["&$A$2&"]"&"Sheet1'"&"!"&$AF$3

    Which is the original formula, not values! However if I copy/paste values and BEFORE moving away from the cell with the newly copied formula, I place the cursor in the formula bar at the end of the new formula, then press return, it works! I would hazard a guess that it's not parsing the formula in the right way with the concatenated string, but if you enter things manually and put an "=" sign in front manually etc, it then works.

    So I'm asking for advice on how to build the formula and then parse it properly, rather than just have it represented as a string, which is what it seems to be doing.

    Regards

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Problem with concatenated formula linking to Share Point site

    it just sits in the cell as though it's just text
    It is just text.

    You cannot build a formula by using an "=" then following it with the text that creates a formula. Excel will think it is just a text string.

    The INDIRECT function can do this for you:

    =INDIRECT($A$1&"/"&"["&$A$2&"]"&"Sheet1'"&"!"&$AF$3)

    However, the INDIRECT function will require the target file to be open, or it will give a #REF! error.

    You may find it necessary to to this with VBA.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. Connection between 2 workbooks - local PC and Share Point
    By toci in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-23-2017, 05:37 AM
  2. Downlaod XLS files from Share point
    By rajesh.pardhe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-05-2014, 04:02 AM
  3. Export Data from Share point
    By adaws in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-03-2014, 10:57 AM
  4. Inputting Username from Share Point to Spreadsheet
    By jmcole in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-29-2013, 03:23 PM
  5. Linked Share Point Workbooks Swapped!
    By KLCalloway in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-16-2013, 11:02 AM
  6. Replies: 1
    Last Post: 05-31-2013, 08:45 AM
  7. How to get data from share point site to excel using macros in 2007?
    By siva1218 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-23-2011, 06:50 AM

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