Results 1 to 4 of 4

Thread: color changing cells

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2005
    Posts
    23

    Cool color changing cells

    i'm working on a spreadsheet app that is used for bill tracking. i need to turn certain cells different colors as the bill due date approaches. any ideas?
    -juster21-

    You are the First Brigade!!

  2. #2
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: color changing cells

    As far I know you will need to use a Macro.

    If you dont' know how (like me) start recording a Macro, color a cell some color, then go to the Macro Editor and modify the recorded function with some If statement.

    I'm sure it's not that difficult.

    Good Luck

  3. #3
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: color changing cells

    Quote Originally Posted by StrangerInBeijing
    As far I know you will need to use a Macro.

    If you dont' know how (like me) start recording a Macro, color a cell some color, then go to the Macro Editor and modify the recorded function with some If statement.

    I'm sure it's not that difficult.

    Good Luck

    Yes, you would need a Macro, or some VB code in an applocation.

    Here is an example:

    VB Code:
    1. Range("B4:H4").Select
    2.     With Selection.Font
    3.         .Name = "Arial"
    4.         .FontStyle = "Regular"
    5.         .Size = 10
    6.         .Strikethrough = False
    7.         .Superscript = False
    8.         .Subscript = False
    9.         .OutlineFont = False
    10.         .Shadow = False
    11.         .Underline = xlUnderlineStyleNone
    12.         .ColorIndex = 3
    13.     End With

    The best way would be for you to experiment using the record macro function

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: color changing cells

    Actually you dont need a macro (although that is an appropriate solution), you can use Conditional Formatting.

    Select a cell that you want to be formatted, then on the menu go to "Formatting" - "Conditional Formatting". In the window that appears you can select which format to apply under specific circumstances (based on the cell value, or a formula value).

    In this case you need to use a formula, so in the first drop-down select "Formula is", and enter a formula like this:
    =INT(TODAY()-B25) >= 3
    This will be true if the date in cell B25 is 3 or more days before today.

    You can then set the format to apply when the formula is true by clicking on the "Format.." button.


    If you want multiple conditional formats for the same cell (ie: one for 3 days, and one for 1 day) you can click the "Add>>" button on the bottom of the Conditional Formatting window.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width