Results 1 to 4 of 4

Thread: Strings in formulas for cell references
Thanks Thanks: 0 Likes Likes: 0

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

    Default Strings in formulas for cell references

    I am trying to make the following work in Excel, not VBA.

    =INDEX('[&A2&.xlsm]&B2&'!$B:$G,5,1)

    I know I am missing string quotations, but am unsure what else is missing. Does anyone have any input here?

  2. #2
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,202
    Post Thanks / Like
    Mentioned
    470 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Strings in formulas for cell references

    You need to use INDIRECT to do that.
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

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

    Default Re: Strings in formulas for cell references

    I am a bit confused on the usage of this function. I see the Indirect function is used to return a valid cell reference from a text string. I attempted to no avail:

    =INDEX('[Indirect(A2).xlsm]Indirect(B2)'!$B:$G,5,1)

    What would you change here?

  4. #4
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,202
    Post Thanks / Like
    Mentioned
    470 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Strings in formulas for cell references

    Try
    =INDEX(INDIRECT("'["&A2&".xlsm]"&B2&"'!$B:$G"),5,1)
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

Some videos you may like

User Tag List

Tags for this Thread

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
  •