+ Reply to Thread
Results 1 to 5 of 5

Help with a Formula to build a working formula from a text string

  1. #1
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Help with a Formula to build a working formula from a text string

    I am using an MDX formula as follows
    Please Login or Register  to view this content.
    I don't think it is relevant that this is an MDX formula, not sure.

    What I want to do is change this formula so it still executes the same way, but it points to a cell reference to get the date. So what I had in mind is this.

    Please Login or Register  to view this content.
    But of course I want the A5 to resolve to the date that is in this cell. I have tried indirect, but can't get that to work. I know I can do this in VBA with something like this.

    Please Login or Register  to view this content.
    But I would like to do this with pure standard functions if possible. Any ideas?
    My approach to providing help is to help you to help yourself. So my answers won't always solve your problem, but hopefully you can learn enough to solve the problem yourself and be more self sufficient for the experience.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Help with a Formula to build a working formula from a text string

    Try

    =CUBEMEMBER("compassbiolap.apac.ko.com Compass2 Bottler_Sales","[Time].[Day].["&A5&"]")
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Re: Help with a Formula to build a working formula from a text string

    I have tried several permutations of this already, but no success. Your example would get tripped up with the double quotes. I have tried using single quotes and double quotes together - no luck. Maybe I will try chr strings

    Ay other ideas?

  4. #4
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Re: Help with a Formula to build a working formula from a text string

    I have tried the following

    Please Login or Register  to view this content.
    and that code correctly renders the formula in the cell, but it is text and not a formula. How do I make this resulting text a formula?

  5. #5
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Re: Help with a Formula to build a working formula from a text string

    OK, Ace_XL, you were right all the time. I was over thinking this issue, and your solution is exactly right. 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. [SOLVED] Use a formula to check if another formula contains specific text/string
    By musketeer in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 04-24-2013, 05:09 PM
  2. Replies: 6
    Last Post: 03-13-2013, 12:40 AM
  3. Formula string for multiple conditions not working.
    By tkc in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-16-2012, 02:42 PM
  4. [SOLVED] Highlight a portion of string text (the string text is a value of a formula)
    By RaymondH in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-02-2012, 06:50 AM
  5. Build String and then Insert it as Formula to Cell
    By Vladamir in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2012, 09:00 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