Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Mar 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hallo,

    I have a problem I was hoping you guys could help me with.

    I goes as following:

    In cell A1 i have written: '=sum
    In cell B1 i have written: (A2:B2)
    In cell C1 i have written: =A1&B1

    In cell C1 the result then is: '=sum(A2:B2)

    My problem is, that i would link Excel to recognise the text in cell C1 as a formula and not a text string. Is this posible?

    Thanks and best regards
    Jonas

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Welcome to Woody's Lounge!

    The result of & is a text string, not a formula, and there is no easy way to make Excel evaluate it as a formula. However, there is a free add-in Morefunc that contains a custom function EVAL that evaluates text expressions.

    Note: EVAL expects an expression without =, so you'd have to enter the word SUM in A1, not '=SUM.

  3. #3
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    New York, New York, USA
    Posts
    266
    Thanks
    0
    Thanked 19 Times in 19 Posts
    If you donít mind a Macro you could use the one below.

    It is currently set up to change just the active cell but could be changed so you could select a range.



    SINGLE ITEM

    Sub MyFormula()
    'Macro Changes Text Formulas into Excel formulas

    ActiveCell.Value = ActiveCell.Value

    End Sub

    FOR RANGE

    Sub MyFmlsSel()

    For Each Cell in Selection
    Cell.Value = Cell.Value
    Next
    End Sub

    Regards,

    Tom Duthie

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    What is your overall goal in doing this?

    If you are trying to have one cell (B1) with a range and A1 to represent some statistical function you could use something in C1 like:

    =SUBTOTAL(A1,INDIRECT(B1))

    Where B1 has the range (just like you do) and A1 has a number representing the function:
    1 AVERAGE
    2 COUNT
    3 COUNTA
    4 MAX
    5 MIN
    6 PRODUCT
    7 STDEV
    8 STDEVP
    9 SUM
    10 VAR
    11 VARP

    Steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •