+ Reply to Thread
Results 1 to 10 of 10

Color changing formula's

  1. #1
    Registered User
    Join Date
    06-19-2007
    Posts
    14

    Color changing formula's

    Can someone either give me the formula or redirect me to a thread about changing the text color of numbers based on value.
    I.e. I need for negitive numbers to be RED Positive numbers to be BLACK and 0 to be YELLOW like below.
    1.0
    0.0
    -1.0

    This formula will be use for a huge data base and only one column needs to be affected by it. Currently I had click the option to change color but it becomes a hassle and there is room for error. I wish to put the data in the column and not worry about the color.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444
    Hi,

    Select the column, then go to

    Format > Conditional Formatting

    and set your formats as required
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Select the cells to affect...

    Go to Format|Conditional Format

    Select Cell Value Is from 1st drop down and select Is Equal To from next drop down. Then enter =0 in formula field. Click Format and choose yellow from Font tab.

    Click ok.

    Clikc Add and select Cell Value Is >>> Is Less Than and enter =0. Click Format and choose Red.

    Click oK

    Click Ok again to finish.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good afternoon MrHitman07

    ...and welcome to the forum!!

    Highlight the whole of the column that you want to affect.
    Press Ctrl + 1, and under the Number tab, select the category Custom.
    Type this into the box and click OK.

    [Red][<0]-#,##0;[Black][>=1]#,##0;[Yellow]#,##0

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  5. #5
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Quote Originally Posted by MrHitman07
    Can someone either give me the formula or redirect me to a thread about changing the text color of numbers based on value.
    I.e. I need for negitive numbers to be RED Positive numbers to be BLACK and 0 to be YELLOW like below.
    1.0
    0.0
    -1.0

    This formula will be use for a huge data base and only one column needs to be affected by it. Currently I had click the option to change color but it becomes a hassle and there is room for error. I wish to put the data in the column and not worry about the color.
    As Sweep says, you *could* use CF for this, but utilising CF imposes certain overheads and restrictions on your workbook. Instead, you can simply use a custom format:

    Select the cells/whole column and go Format>Cells>Number tab and click the Custom category. In the Type box type:

    0.00;[red]-0.00;[yellow]0.00

    and click OK.

    Richard

  6. #6
    Registered User
    Join Date
    06-19-2007
    Posts
    14
    so basically, if cell value is less than 0.0 how do I make it red? I'm a noob

  7. #7
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Hi

    Have you followed the steps I gave in my post?

    Richard

  8. #8
    Registered User
    Join Date
    06-19-2007
    Posts
    14
    ya dude I did, I was responding to sweep with that last reply. urs took a while to refresh for some reason, but Thanks a bundle it works I exactly the way I want it to now rich

  9. #9
    Registered User
    Join Date
    05-23-2006
    Posts
    29

    How to change color of cells?

    I can do as it states above, changing A1 to green when C1>0.
    How do it tell the entire column to do the same with the A column and C column being attached in the same row?
    What I want to do is set up the A column (same row ) to change color based upon entries in the C column.
    I tried autofill and it impacts all of A column when C1 is >0
    Can I get some help with this?
    Thanks, John

  10. #10
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by John K
    I can do as it states above, changing A1 to green when C1>0.
    How do it tell the entire column to do the same with the A column and C column being attached in the same row?
    What I want to do is set up the A column (same row ) to change color based upon entries in the C column.
    I tried autofill and it impacts all of A column when C1 is >0
    Can I get some help with this?
    Thanks, John
    Hi,

    Select the A column, and cell A1 highlights a different colour, enter the Conditional format as it would apply to that (A1) cell, then set the required Font colour.

    hth
    ---
    Si fractum non sit, noli id reficere.

+ 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