+ Reply to Thread
Results 1 to 6 of 6

change background row color with change of date in a cell

  1. #1
    Urszula
    Guest

    change background row color with change of date in a cell

    How do I change the background colour of the rows as the date in a cell
    changes. So to get a 3D effect, eg:

    29/5/06 = row grey
    30/5/06 = row no colour
    31/5/06 = row grey

    Can this be done?

    Urszula

  2. #2
    Forum Contributor
    Join Date
    03-23-2006
    Location
    Vancouver
    Posts
    114

    Yes Urszula, there is conditional formatting.

    Quote Originally Posted by Urszula
    How do I change the background colour of the rows as the date in a cell
    changes. So to get a 3D effect, eg:

    29/5/06 = row grey
    30/5/06 = row no colour
    31/5/06 = row grey

    Can this be done?

    Urszula
    Assuming your dates are in column A and your first date is in cell A3, use:

    Format > Conditional Formatting > Condition 1 > Formula is

    =MOD($A3,2)=0

    Click Format > Patterns and choose the grey that you want.

    Edit > Copy Cell A3 and Edit > Paste Special > Formats to all the cells in your
    range.

  3. #3
    Biff
    Guest

    Re: change background row color with change of date in a cell

    Hi!

    Do you want the entire row (column A to column IV) colored? Or, do you just
    want a certain section of the row (A1:J1) colored? It's a waste of resouces
    to color the entire row if you're not using the entire row.

    Assume your dates are in the range A1:A3 and you want to color the range to
    column J.

    Select the range A1:J3
    Goto Format>Conditional Formatting
    Formula Is: =MOD(DAY($A1),2)=1
    Click the Format button
    Select the Patterns tab
    Click on the shade of gray you want
    OK you way out

    Biff

    "Urszula" <[email protected]> wrote in message
    news:[email protected]...
    > How do I change the background colour of the rows as the date in a cell
    > changes. So to get a 3D effect, eg:
    >
    > 29/5/06 = row grey
    > 30/5/06 = row no colour
    > 31/5/06 = row grey
    >
    > Can this be done?
    >
    > Urszula




  4. #4
    Forum Contributor
    Join Date
    03-23-2006
    Location
    Vancouver
    Posts
    114

    Mod(A1,2) vs. Mod(day(A1),2)

    If you use Mod(day... you will get two adjacent same-coloured rows at the end of a month with 31 days.

  5. #5
    Biff
    Guest

    Re: change background row color with change of date in a cell

    How?

    MOD(30,2)=0
    MOD(31,2)=1

    Biff

    "CaptainQuattro"
    <[email protected]> wrote in
    message news:[email protected]...
    >
    > If you use Mod(day... you will get two adjacent same-coloured rows at
    > the end of a month with 31 days.
    >
    >
    > --
    > CaptainQuattro
    > ------------------------------------------------------------------------
    > CaptainQuattro's Profile:
    > http://www.excelforum.com/member.php...o&userid=32763
    > View this thread: http://www.excelforum.com/showthread...hreadid=542781
    >




  6. #6
    Biff
    Guest

    Re: change background row color with change of date in a cell

    Oh, ok, I see what you mean:

    1/31/2006
    2/1/2006

    Well, the posted example didn't "demonstrate" that that is how this is to be
    used. <g>

    Biff

    "Biff" <[email protected]> wrote in message
    news:[email protected]...
    > How?
    >
    > MOD(30,2)=0
    > MOD(31,2)=1
    >
    > Biff
    >
    > "CaptainQuattro"
    > <[email protected]> wrote in
    > message
    > news:[email protected]...
    >>
    >> If you use Mod(day... you will get two adjacent same-coloured rows at
    >> the end of a month with 31 days.
    >>
    >>
    >> --
    >> CaptainQuattro
    >> ------------------------------------------------------------------------
    >> CaptainQuattro's Profile:
    >> http://www.excelforum.com/member.php...o&userid=32763
    >> View this thread:
    >> http://www.excelforum.com/showthread...hreadid=542781
    >>

    >
    >




+ 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