+ Reply to Thread
Results 1 to 6 of 6

Incell formatting and custom number formats

  1. #1
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    491

    Incell formatting and custom number formats

    Hi,

    I want to underline only a part of a cell via in-cell formatting which works fine.

    However, once I change to a custom number format of e.g.
    Please Login or Register  to view this content.
    the partial in-cell formatting (underlining) disappears.
    Can someone please explain why that is and how to fix it?
    The same is true for other in-cell formattings such as italics etc.

    Thanks
    Last edited by 6StringJazzer; 03-22-2019 at 09:47 AM. Reason: Replace "at" with "@" sign

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Incell formatting and custom number formats

    You don't say what data you are storing in the cell but from your description I assume that the underlining is applied to text, since it won't work for numbers. The text segment of your custom format overrides whatever other formatting is in the cell. Remove the text segment and your original text formatting will be restored:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    491

    Re: Incell formatting and custom number formats

    Quote Originally Posted by 6StringJazzer View Post
    You don't say what data you are storing in the cell but from your description I assume that the underlining is applied to text, since it won't work for numbers. The text segment of your custom format overrides whatever other formatting is in the cell. Remove the text segment and your original text formatting will be restored:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Got it.
    But this means that there's basically no way for me to implement the same single space for underlined text (if e.g. right aligned) that my custom number format uses for numbers, right?

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Incell formatting and custom number formats

    I see, I didn't know you wanted a space after right-aligned text.

    I have never run across this before. I can't find anywhere that this specific conflict is documented, but my experimenting confirms that you can't have both text formatting and in-cell character formatting at the same time.

    Just curious--why do you want do add a space at the end of everything?

  5. #5
    Valued Forum Contributor
    Join Date
    02-06-2013
    Location
    Germany
    MS-Off Ver
    365
    Posts
    491

    Re: Incell formatting and custom number formats

    Quote Originally Posted by 6StringJazzer View Post
    I see, I didn't know you wanted a space after right-aligned text.

    I have never run across this before. I can't find anywhere that this specific conflict is documented, but my experimenting confirms that you can't have both text formatting and in-cell character formatting at the same time.

    Just curious--why do you want do add a space at the end of everything?
    Just like Excel does, I am used to numbers being right aligned and text left aligned (and dates are either/or).

    For positive and negative numbers I use the above custom number format to have numbers/decimals properly aligned as I use opening and closing brackets for negative numbers, e.g. -200 is (200).
    So 200 is properly aligned with number format: #,##0_)

    The tricky part comes in when I use text as a heading which is the one case where it should not be left aligned but be aligned according to the data it repesents.
    E.g. the heading is "Sales in €'000" where its corresponding data is numbers which are right aligned.
    I then wish to right align also the heading to make it look proper in a table.
    If I then try to make only the €'000 portion bold (for whatever neat or daft reason), I run into the above mentioned problem.

    Long story short...maybe I am going a bit too heavy on formatting?!

    A similar problem occurs when a heading is e.g. longer than a reasonable column width in which case I lose the 'trailing space' if I insert a manual line break with alt+enter; but in this case a possible workaround is at least to spread the heading over 2 separate lines (if the other table headings allow for this).

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Incell formatting and custom number formats

    Well, all I can offer is that if these are headings, it's a one-time setup and you could manually insert the extra space at the end right into the cell.

+ 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. Custom number formats
    By source in forum Excel General
    Replies: 9
    Last Post: 12-18-2013, 11:31 AM
  2. Replies: 1
    Last Post: 09-22-2011, 05:42 AM
  3. Conditional Formatting With Custom Number Formats
    By chris_3eb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-01-2011, 07:33 PM
  4. Custom Number Formats
    By vooshy in forum Excel General
    Replies: 4
    Last Post: 03-20-2009, 05:29 PM
  5. Custom Number Formats - Help
    By James Hamilton in forum Excel General
    Replies: 3
    Last Post: 05-16-2006, 11:15 AM
  6. Custom number formats
    By Louise in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-05-2006, 04:00 AM
  7. [$-409] in Custom Number Formats
    By Conan Kelly in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-14-2006, 07:25 AM
  8. [SOLVED] [$-409] in Custom Number Formats
    By Conan Kelly in forum Excel General
    Replies: 1
    Last Post: 03-29-2006, 10:30 PM

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