+ Reply to Thread
Results 1 to 8 of 8

Setting bold using numberformat

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,083

    Setting bold using numberformat

    I have a spreadsheet with the results from various calculations. One of these results is a table with a column of positive and negative results. The negatives are necessary but secondary. I want the positives to stand out, so would like to format them differently.

    I found this old post on another website, and thought it would help me
    Please Login or Register  to view this content.
    I've attempted to use this to color (Magenta) and bold my positive numbers. It works for the color, but not the bolding. Below I've pasted my code, and would appreciate any help you can provide in getting me going.
    Please Login or Register  to view this content.
    Last edited by jomili; 06-04-2010 at 01:13 PM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,064

    Re: Setting bold using numberformat

    You can't do Bold using a number format. You would have to use Conditional Formatting.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,083

    Re: Setting bold using numberformat

    Bummer. "Joe", in the earlier conversation, indicated it could happen, but there was no follow up to his last code, so I tried it, to no avail.

    Any other ideas out there?

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,064

    Re: Setting bold using numberformat

    It was Peter T actually, not Joe, and I don't believe he was indicating that you could make the cell bold using a number format (since you can't), he was merely indicating a way to make the numbers stand out - i.e. colouring them. Your options are CF or code to specifically format the cell bold.
    I don't claim to know everything though, so perhaps someone will surprise me.

  5. #5
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,083

    Re: Setting bold using numberformat

    You're right, I misread that it was Joe T. Well, if conditional formatting is the only way, I'll do it that way.

    I'll wait until tomorrow to mark this one solved, in case anyone else wants to chime in.

  6. #6
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,083

    Re: Setting bold using numberformat

    Okay, now I'm having trouble with conditional formatting. I'm getting a run-Time 1004 error message, saying "Unable to set the Bold property of the font class", and highlighting the "Bold = True" line.
    Please Login or Register  to view this content.

  7. #7
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,064

    Re: Setting bold using numberformat

    Why are you using Selection when you didn't select the range?

  8. #8
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,083

    Re: Setting bold using numberformat

    Well, it seemed like a bright idea when I copied it from the macro recorder. But, now that you've pointed it out, I can see where changes need to be made. Here's the corrected code
    Please Login or Register  to view this content.

+ 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