+ Reply to Thread
Results 1 to 6 of 6

Use CONCATENATE to create a reference formula

  1. #1
    Registered User
    Join Date
    06-12-2019
    Location
    houston, tx
    MS-Off Ver
    1903
    Posts
    4

    Use CONCATENATE to create a reference formula

    I am trying to use CONCATENATE to create the formula:

    =[formula_connect_test.xlsx]data7!$F$2

    That would reference some data(numerical) in another excel spreadsheet. When I simply type "=" and then click on the cell I want to reference the formula works fine. However I would like to have the formula look like this:

    =CONCATENATE("=[formula_connect_test.xlsx]data",B5,"!$F$2")

    Where the cell "B5" contains data(the number 7) to determine which tab on the referenced spreadsheet I would like to pull data from. When I use this CONCATENATE formula it creates the correct formula but rather than the data I want to pull it just leaves this in the cell:

    =[formula_connect_test.xlsx]data7!$F$2

    When I simply type "=" then click on the cell I reference the formula works no problem returning the numerical data but for some reason it will not when I try to use the concatenate function to create the reference. Does anyone know a solution for this?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Use CONCATENATE to create a reference formula

    Think you'd need to use INDIRECT
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    06-12-2019
    Location
    houston, tx
    MS-Off Ver
    1903
    Posts
    4

    Re: Use CONCATENATE to create a reference formula

    I have experimented with using the INDIRECT function but am not very familiar with it. Any idea on how I would structure the statement?

  4. #4
    Registered User
    Join Date
    06-12-2019
    Location
    houston, tx
    MS-Off Ver
    1903
    Posts
    4

    Re: Use CONCATENATE to create a reference formula

    I have tried to used INDIRECT in the following 2 ways but just get a "#REF" error as the output.

    =INDIRECT(CONCATENATE("=[formula_connect_test.xlsx]data",B5,"!$F$2"))
    =INDIRECT("=[formula_connect_test.xlsx]data"&B5&"!$F$2")

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Use CONCATENATE to create a reference formula

    Hello hjbarazi and Welcome to Excel Forum.
    I would be easier to help if you could upload a small desensitized sample of your workbook (not a picture or pasted copy) by clicking on the GO ADVANCED button below the Quick Reply window and then scrolling down to Manage Attachments to open the upload window. Be sure to include expected results based on the sample data.
    That said try: =INDIRECT("'[formula_connect_test.xlsx]data"&B5&"'!F2")
    Also the formula_connect_test.xlsx workbook will need to be open.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Use CONCATENATE to create a reference formula

    What you need is I believe:

    Please Login or Register  to view this content.
    HOWEVER, that won't work if the formula_connect_text.xslx sheet is not open - INDIRECT with external references requires that the external reference is already open.

    WBD
    Office 365 on Windows 11, looking for rep!

+ 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. Can I create a formula using concatenate?
    By rohed in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 05-05-2022, 11:54 AM
  2. Concatenate in a formula to reference a different worksheet
    By buyshirts in forum Excel Formulas & Functions
    Replies: 23
    Last Post: 12-17-2015, 12:06 PM
  3. [SOLVED] Using EVALUATE to create a formula from text
    By JeteMc in forum Excel General
    Replies: 4
    Last Post: 12-21-2014, 09:25 AM
  4. Replies: 3
    Last Post: 11-29-2013, 05:33 AM
  5. [SOLVED] Need to create a Concatenate formula that displays on a conditional basis
    By chrisnw20 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-08-2013, 11:24 AM
  6. [SOLVED] Create calc formula with INDIRECT and CONCATENATE
    By FixandFoxi in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-28-2012, 05:53 AM
  7. [SOLVED] how can i use concatenate to create a linking formula?
    By DRandolph in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-25-2006, 03:30 PM

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