+ Reply to Thread
Results 1 to 10 of 10

Using Bold and Italic on certain text in formula

  1. #1
    Registered User
    Join Date
    12-15-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    11

    Using Bold and Italic on certain text in formula

    Hi ppl, what i've known so far there is no such things that we can put bold/italic to text which have formula. Is it? I knew that when i'm in the middle of excel project and its a lot things that I cannot return/start it back. So its disapointed me and bother me too much that might be complicated for me to find any solutions or ideas. I'm using CONCATENATE and formula that need to be fit with some forms. Can you guys hand me on this?

    I accept any ideas or suggestions.

    Thank you.

  2. #2
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Using Bold and Italic on certain text in formula

    As far as I know, within a formula you cannot format they text in the ways you are asking...within a Text cell you can, just highlight the text to be formatted and apply formatting, the only way i can think of for formulas themselves is through VBA, and maybe not then even...sorry

    The text displayed from a formula can be manipulated for bold/italic/underline/color through Format Cells and/or Conditional Formatting though...that may help
    Last edited by dredwolf; 03-05-2013 at 08:30 PM.
    A picture may be worth a thousand words, BUT, a sample Workbook is worth a thousand screenshots!
    -Add a File - click advanced (next to quick post), scroll to manage attachments, click, select add files, click select files, select file, click upload, when file shows up at bottom left, click done (bottom right), click submit
    -To mark thread Solved- go top of thread,click Thread Tools,click Mark as Solved
    If you received helpful response, please remember to hit the * of that post

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Using Bold and Italic on certain text in formula

    Not even with VBA can you partially format the result of a formula while retaining the formula.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Using Bold and Italic on certain text in formula

    Didn't think so, but was not sure, Thanks shg

  5. #5
    Registered User
    Join Date
    12-15-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Using Bold and Italic on certain text in formula

    SO..should I give up on this? What do you think guys? Its already been 2 months ...

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Using Bold and Italic on certain text in formula

    What's your working definition of "can't be done"?
    Last edited by shg; 03-06-2013 at 09:26 AM.

  7. #7
    Registered User
    Join Date
    12-15-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Using Bold and Italic on certain text in formula

    it's about time...

  8. #8
    Forum Expert dredwolf's Avatar
    Join Date
    10-27-2012
    Location
    Clearwater,Canada
    MS-Off Ver
    Excel 2007
    Posts
    2,649

    Re: Using Bold and Italic on certain text in formula

    If you got a solution, I would LOVE to see it, I have applications for it myself ?
    Plus, any solution posted can be searched & found by those willing to do the search

  9. #9
    Registered User
    Join Date
    06-24-2013
    Location
    Jacksonville, FL
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Using Bold and Italic on certain text in formula

    dredwolf, I'm not sure if you still need it, but I found a workaround for this.

    I found this bulletin board thread which basically states you can use the .Characters property in VBA to bold/italicize specific text.

    The syntax was a bit different for me, as I have Office 365, so here's how I coded it. First, a little bit of background about my workbook. I have a tab labeled 'VBA' which I use to store my variables so that when something goes buggy, it makes it quicker for me to find the source, track it down & fix it. For this particular problem I wanted to display two completely different blocks of text formatted completely differently depending on a single checkbox.

    Then, I linked the CheckBox to a cell in my 'VBA' tab and created a simple CONCATENATE formula inside an IF statement which would display the target text depending on the value of the CheckBox.

    Please Login or Register  to view this content.
    Then, I had to determine where the starting & ending positions of the bold/italic would be. (Fortunately, the text I was bolding/italicizing went to the end, but you could modify the following formula fairly easily). Note: the 1st line of the following formulas went in one cell which I'll be referencing as CharBeg in a second, and the 2nd line went into a different cell referenced as CharEnd

    Please Login or Register  to view this content.
    Then, I put the following code in VBA (along with adding the Dim statements for the variables)
    Please Login or Register  to view this content.
    Lastly, I assigned the YourSubHere macro to the CheckBox, so whenever the CheckBox is checked/unchecked, the text in TargetRange (A33 for me) is automatically updated.

    Hope that helps, and let me know if I can help further.

  10. #10
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Using Bold and Italic on certain text in formula

    Quote Originally Posted by shg View Post
    Not even with VBA can you partially format the result of a formula while retaining the formula.
    Quote Originally Posted by Shazardred View Post
    dredwolf, I'm not sure if you still need it, but I found a workaround for this.
    The workaround provided by Shazardred converts the formula to a value before applying the formatting. That's a great solution if you indeed want to convert the formula to a value. shg's comment is still true.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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