+ Reply to Thread
Results 1 to 9 of 9

Displaying the true text of Indirect formula

  1. #1
    Registered User
    Join Date
    04-16-2024
    Location
    UK
    MS-Off Ver
    MS365 Version 2402
    Posts
    9

    Displaying the true text of Indirect formula

    Hi,

    I have created a dynamic calculation that creates named ranges, the names will change each time the calculation is run so I was unable to hardcode the named range. Therefore, the solution I have used is INDIRECT, however, I need to pass this spreadsheet onto someone who will need to view the formula is plain English. I know you can used form FORMULATEXT to display the formula but this doesn't show exactly what INDIRECT is doing. Is anyone able to give any advice? Example below.

    Cell C2 (FronEndCalc) is creating the named range of JanToMar_LS using formula INDIRECT(B2&"_LS"), the named range of JanToMar_LS is in cell B1 on BackEndCalc), ideally I want the text of JanToMar_LS (the result of cell C2). Some of the calculation are very long but this example is a simple one.

    Is this possible?

    I have attached an example.

    FYI - the named ranges get updated each time the calculation is re-run using VBA.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,301

    Re: Displaying the true text of Indirect formula

    Try this:

    =B2&TEXTBEFORE(TEXTAFTER(FORMULATEXT(C2),""""),"""")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,301

    Re: Displaying the true text of Indirect formula

    Dynamic spill version (remove all expected results first):

    =B2:B3&TEXTBEFORE(TEXTAFTER(FORMULATEXT(C2:C3),""""),"""")

    Change ranges to suit.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-16-2024
    Location
    UK
    MS-Off Ver
    MS365 Version 2402
    Posts
    9

    Re: Displaying the true text of Indirect formula

    Thanks AliGW.

    I wasn't sure it was at all possible, so my example was probably too simple. A more complex example would be with multiple INDIRECT.

    I have updated my spreadsheet with rows 3 and 4 on the BackEndCalc and columns D and F/G on the FrontEndCalc, is the result in F or G possible?

    I've tried using your example for the first solution but struggling to get it to work.

    Really appreciate your help.
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,301

    Re: Displaying the true text of Indirect formula

    I hiope they don't get any more complicated!

    Try this:

    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(FORMULATEXT(D2),"INDIRECT(B"&ROW(),B2),"&""",""),""")","")

    copied down.
    Last edited by AliGW; 04-22-2024 at 08:07 AM.

  6. #6
    Registered User
    Join Date
    04-16-2024
    Location
    UK
    MS-Off Ver
    MS365 Version 2402
    Posts
    9

    Re: Displaying the true text of Indirect formula

    That's incredibly quick, thank you. They do get a little more complicated but with the two examples I should be able to figure it out.

    Thanks very much.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,301

    Re: Displaying the true text of Indirect formula

    I'm here if you need further assistance.

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  8. #8
    Registered User
    Join Date
    04-16-2024
    Location
    UK
    MS-Off Ver
    MS365 Version 2402
    Posts
    9

    Re: Displaying the true text of Indirect formula

    I will mark as resolved and reputation added.

    Thanks again

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,301

    Re: Displaying the true text of Indirect formula

    Thanks.

+ 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. Offset not displaying result when there is Indirect
    By TXT007 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-27-2021, 01:59 AM
  2. Formula to pull text from multiple cells if formula = true
    By bommar2 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-13-2013, 12:16 PM
  3. [SOLVED] IF - value if true - text + formula
    By SergSlim in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-05-2012, 08:52 AM
  4. Displaying true or false if a cell is the lowest value
    By jasonmatthaynes in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-19-2008, 11:11 PM
  5. Displaying the result of a formula in a text box
    By julesl in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-13-2005, 06:05 AM
  6. Displaying data based on a TRUE/FALSE value in a cell
    By static69 in forum Excel General
    Replies: 3
    Last Post: 06-01-2005, 02:09 AM
  7. Displaying text along with formula results
    By jesterhs in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-17-2005, 03:00 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