+ Reply to Thread
Results 1 to 6 of 6

Getting Excel to read a text string created by CONCATENATE as a formula in another cell?

  1. #1
    Registered User
    Join Date
    12-02-2021
    Location
    Norwich, England
    MS-Off Ver
    Excel for Microsoft 365 MSO - 64-bit
    Posts
    5

    Question Getting Excel to read a text string created by CONCATENATE as a formula in another cell?

    Hi All,

    I am trying to create a template document for work that automates a few processes. The process involves importing CSV data through the Get Data button and as such will import a new sheet of which the name will vary.

    I have got a macro that will list this imported sheet's name in a specified cell (for ease I have not included this in the attached I have instead just typed the name). I need to then use the imported sheet's name as part of an XLOOKUP formula.

    Using CONCATENATE I can create the formula needed (shown in cell A4 of the attached), however, I cannot figure out how to get excel to read this as a formula in cell A7.

    Any help would be greatly appreciated.

    Many thanks,
    Roy
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Getting Excel to read a text string created by CONCATENATE as a formula in another cel

    Hi,

    Please upload the actual complete workbook and show exactly what you expect to see by manually adding the result and clearly indicate which is the result cell.

    It isn't clear at the moment how this all hangs together
    Your Xlookup references A1:K1 but we've no idea what A1:K1 contains. Ditto A2:K50, all we see is A2:A4. We've no idea what's in columns B:K

    You mention a formula in A7 but we've no idea what A7 should be.

    You really need to explain everything. We're usually quite good but not psychic.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    12-02-2021
    Location
    Norwich, England
    MS-Off Ver
    Excel for Microsoft 365 MSO - 64-bit
    Posts
    5

    Re: Getting Excel to read a text string created by CONCATENATE as a formula in another cel

    Apologies I have not explained this brilliantly.

    The formula that I have created through CONCATENATE in cell A4 works, the problem I have is that I have to copy and paste as value into another cell, then copy and paste that into the formula bar of cell A7. I am sure with all of excels capabilities that it should be able to read this directly from the result created in cell A4 I am just unsure of how to get it to do so.

    Unfortunately, I can't share the complete workbook as it contains sensitive information.

    Regards,
    Roy

  4. #4
    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,425

    Re: Getting Excel to read a text string created by CONCATENATE as a formula in another cel

    I'm using an iPad so I haven't tried to look at the code. In terms of a function/formula, you would need to use INDIRECT to refer to the cell containing the sheet name.
    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


  5. #5
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Getting Excel to read a text string created by CONCATENATE as a formula in another cel

    Slightly adapted a solution I found here, as you are using 365 https://superuser.com/questions/2533...were-a-formula

    1. Open Name Manager
    2. Create new name, call it "eval", refers to =LAMBDA(x,IF(TODAY(),EVALUATE(x),))
    3. =eval(a4) should then do what you are asking.

  6. #6
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Getting Excel to read a text string created by CONCATENATE as a formula in another cel

    Another way of achieving the same result is to use INDIRECT and ADDRESS:

    =XLOOKUP(A6,INDIRECT(ADDRESS(1,1,,,A2)&":"&ADDRESS(1,11)),INDIRECT(ADDRESS(2,1,,,A2)&":"&ADDRESS(50,11)))

    Note you only put the sheet reference in the first of the two ADDRESS functions which make up each range.

+ 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: 02-27-2021, 01:54 AM
  2. Using If Formula with Concatenate to Join Text String
    By jasonb9 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-14-2018, 09:28 AM
  3. [SOLVED] Concatenate text string search into one cell
    By Trnecessary in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-18-2018, 01:00 PM
  4. Replies: 8
    Last Post: 05-03-2014, 12:49 AM
  5. Cell formula from concatenate string
    By sailingdan in forum Excel General
    Replies: 1
    Last Post: 11-06-2007, 05:28 PM
  6. how do i concatenate a string and cell formula and use a comma?
    By bob alou in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-24-2006, 11:35 AM
  7. [SOLVED] Created Excel files are read-only
    By Bales in forum Excel General
    Replies: 2
    Last Post: 01-04-2005, 02:06 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