Results 1 to 8 of 8

Setting bold using numberformat

Threaded View

jomili Setting bold using... 06-03-2010, 09:18 AM
romperstomper Re: Setting bold using... 06-03-2010, 09:29 AM
jomili Re: Setting bold using... 06-03-2010, 09:36 AM
romperstomper Re: Setting bold using... 06-03-2010, 09:41 AM
jomili Re: Setting bold using... 06-03-2010, 09:45 AM
jomili Re: Setting bold using... 06-03-2010, 10:09 AM
romperstomper Re: Setting bold using... 06-03-2010, 10:12 AM
jomili Re: Setting bold using... 06-03-2010, 10:19 AM
  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,065

    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
    I'm attempting to make a budget in Excel and would like to format a cell to turn bold 
    and red when the sum equals a negative number and for the cell to turn bold and black 
    when the sum equals a positive number. I believe there is a way to do it but I'm not 
    sure how to go about doing so. Any help you can provide would be great. Thanks!
    
    You can use NumberFormat. The -ve format is between the 1st & {optional) 2nd
    semi-colons. Look at the examples in Custom, or simply
    "General;[Red]-General" without the quotes.
    
    Programatically,
    
    dim rng as Range
    dim sNumFmt as string
    
    sNumFmt = "#,##0.00;[Red]-#,##0.00;[Blue]""zero"""
    set rng = Selection
    rng.NumberFormat = sNumFmt
    
    Regards,
    Peter T
    
    "Joe" <Joe@discussions.microsoft.com>
    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.
    'Copy the "Reports" page to the "Results" page (new copy)
        Application.ScreenUpdating = False
        Sourcewb.Worksheets("Report").usedrange.Copy Destwb.Worksheets("Results").Cells(Last + 1, 1)
        Destwb.Worksheets("Results").Columns("I:I").NumberFormat = "[Magenta]#,##0.00_);(0.00)"
    Last edited by jomili; 06-04-2010 at 01:13 PM.

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