+ Reply to Thread
Results 1 to 7 of 7

Changing Formula Color NOT cell Color in Formula Bar

  1. #1
    Registered User
    Join Date
    07-27-2008
    Location
    Boston
    Posts
    4

    Changing Formula Color NOT cell Color in Formula Bar

    Hi,

    I know you can change cell colors and conditional formatting, but can change the formula text color (inside the formula bar) and NOT the cell color?

    For example ...

    Inside my formula bar:
    =56.99+27.34+910.18+12.99

    Inside my cell (that displays the sum total):
    3714.16 (Note that I want this color displayed at normal black)

    Is this possible?

    Thank you.

  2. #2
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256

    Two or more formula colors

    Not easily.
    It is possible to change the Text color. Text can transformed to Numbers.
    It all depends how important it is to have another color.

    HTH
    Ola
    Last edited by olasa; 07-27-2008 at 04:35 PM.

  3. #3
    Registered User
    Join Date
    07-27-2008
    Location
    Boston
    Posts
    4
    Thank you for the response.

    It is important for me to change the color as I need to track estimated costs. These estimated costs will be highlighted in red for future change. Can you describe the process in doing this?

    Thanks!

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    You can't have text of varying colors in the formula bar.

    Rather than hard-code values in formulas, you can put the numbers in separate cells, and then color-code those as you wish.

    Or you could do

    =56.99 + 27.34 + 910.18 + N("Estimated") + 12.99

  5. #5
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256

    Sum text values

    Here is one option (see encl. file)
    It's not a very nice solution - that is an understatement - but it can sum text values.
    The only thing is that the text values has to have a + sign to start and to end each value. Apart from that each value can be colored.

    Example:
    Text: '=+10000+1000+100+10+
    Result: 11110

    Formula:
    =SUMPRODUCT(--MID(A2;
    LARGE(ROW(INDIRECT(LEN(A2)&":1"))*(MID(A2;ROW(INDIRECT("1:"&LEN(A2)));1)="+");
    (LEN(A2)-LEN(SUBSTITUTE(A2;"+";"")))+1-ROW(INDIRECT("2:"&(LEN(A2)-LEN(SUBSTITUTE(A2;"+";"")))))+1);
    LARGE(ROW(INDIRECT(LEN(A2)&":1"))*(MID(A2;ROW(INDIRECT("1:"&LEN(A2)));1)="+");
    (LEN(A2)-LEN(SUBSTITUTE(A2;"+";"")))-ROW(INDIRECT("2:"&(LEN(A2)-LEN(SUBSTITUTE(A2;"+";"")))))+1)-
    LARGE(ROW(INDIRECT(LEN(A2)&":1"))*(MID(A2;ROW(INDIRECT("1:"&LEN(A2)));1)="+");
    (LEN(A2)-LEN(SUBSTITUTE(A2;"+";"")))+1-ROW(INDIRECT("2:"&(LEN(A2)-LEN(SUBSTITUTE(A2;"+";"")))))+1)))
    HTH
    Ola
    Attached Files Attached Files

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    If you wanted that approach, you could do this:
    • Select cell B2
    • Do Insert > Name > Define, Eval Refers to: = Evaluate(A2) (NB: no dollar signs)
    • The formula =Eval evaluates a well-formed text formula in the cell to its left. So enter it in B2 to see the result. (The trailing plus sign in olasa's example has to go.)
    Please Login or Register  to view this content.
    Last edited by shg; 07-28-2008 at 01:07 PM.

  7. #7
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256

    Calculate Text formula: =EVAL or =EVAL()

    Shg, slightly better ;-)
    Lucas1234, what shg is proposing is much better! It will handle both + and - numbers and formulas i.e. "=AVERAGE(100,-50)"

    Actually there are two options:
    Alt.1: Use the =EVAL Defined Name. In short do what shg explained. Here is an article in Ozgrid's Newsletter.
    Alt.2: Use the =EVAL() Formula. But it needs to be installed, since it's an add-in.
    It comes from the Morefunc add-in and is one of the most known free add-in to Excel.

    Hope this helped
    Ola
    Last edited by olasa; 07-29-2008 at 10:13 AM. Reason: Changed title

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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