+ Reply to Thread
Results 1 to 8 of 8

Shading row with weekend dates

  1. #1
    Registered User
    Join Date
    08-13-2004
    Posts
    66

    Shading row with weekend dates

    Hi,

    I would like to create a spreasheet that will have the dates for each day in the current month showing from A1 to A31 with the rows with weekend dates shaded grey. How would I use conditional formatting to do this? or is there another way?

    Thanks

  2. #2
    Dave O
    Guest

    Re: Shading row with weekend dates

    In conditional formatting, set the condition to "Formula Is" and use
    this formula:
    =OR(WEEKDAY(A3)=7,WEEKDAY(A3)=1)

    .... where A3 is the cell with the date. The WEEKDAY function returns
    the date's day number within the week; above, 7 = Saturday and 1 =
    Sunday. You can change that if you prefer- see Help.


  3. #3
    Dave Peterson
    Guest

    Re: Shading row with weekend dates

    Select your range (a1:A31) and with A1 the activecell:

    format|Conditional formatting
    formula is:
    =WEEKDAY(A1,2)>5
    and give it a nice shade.

    Ps. I like this custom format for dates like this:

    mm/dd/yyyy*_dddd
    (Underscore represents a spacebar)

    DKerr wrote:
    >
    > Hi,
    >
    > I would like to create a spreasheet that will have the dates for each
    > day in the current month showing from A1 to A31 with the rows with
    > weekend dates shaded grey. How would I use conditional formatting to do
    > this? or is there another way?
    >
    > Thanks
    >
    > --
    > DKerr
    > ------------------------------------------------------------------------
    > DKerr's Profile: http://www.excelforum.com/member.php...o&userid=13087
    > View this thread: http://www.excelforum.com/showthread...hreadid=471728


    --

    Dave Peterson

  4. #4
    bj
    Guest

    RE: Shading row with weekend dates

    I would use conditional formating
    select the range you wish to format
    <format><conditional formating>
    change "Cell value is" to "Formula is"

    formula is
    =or(weekday($A1)=1,Weekday(A$1)=6)
    and set format pattern to your wanted shade
    (Note sometimes I have to go back into the conditional formating screen and
    get rid of unwanted quote marks.)
    "DKerr" wrote:

    >
    > Hi,
    >
    > I would like to create a spreasheet that will have the dates for each
    > day in the current month showing from A1 to A31 with the rows with
    > weekend dates shaded grey. How would I use conditional formatting to do
    > this? or is there another way?
    >
    > Thanks
    >
    >
    > --
    > DKerr
    > ------------------------------------------------------------------------
    > DKerr's Profile: http://www.excelforum.com/member.php...o&userid=13087
    > View this thread: http://www.excelforum.com/showthread...hreadid=471728
    >
    >


  5. #5
    Jonathan Cooper
    Guest

    RE: Shading row with weekend dates

    Select your rows: 1:31, making sure that A1 is the active cell.

    Use conditional formatting

    Formula is:
    =IF(WEEKDAY($A1,2)>=6,TRUE,FALSE)
    Picke the color you want it shaded



    "DKerr" wrote:

    >
    > Hi,
    >
    > I would like to create a spreasheet that will have the dates for each
    > day in the current month showing from A1 to A31 with the rows with
    > weekend dates shaded grey. How would I use conditional formatting to do
    > this? or is there another way?
    >
    > Thanks
    >
    >
    > --
    > DKerr
    > ------------------------------------------------------------------------
    > DKerr's Profile: http://www.excelforum.com/member.php...o&userid=13087
    > View this thread: http://www.excelforum.com/showthread...hreadid=471728
    >
    >


  6. #6
    Stefi
    Guest

    RE: Shading row with weekend dates

    Select column A, then Conditional formatting/Formula
    Enter in the formula field =WEEKDAY(A1;2)>5
    Click Format and choose a color!
    Regards,
    Stefi


    „DKerr” ezt *rta:

    >
    > Hi,
    >
    > I would like to create a spreasheet that will have the dates for each
    > day in the current month showing from A1 to A31 with the rows with
    > weekend dates shaded grey. How would I use conditional formatting to do
    > this? or is there another way?
    >
    > Thanks
    >
    >
    > --
    > DKerr
    > ------------------------------------------------------------------------
    > DKerr's Profile: http://www.excelforum.com/member.php...o&userid=13087
    > View this thread: http://www.excelforum.com/showthread...hreadid=471728
    >
    >


  7. #7
    David McRitchie
    Guest

    Re: Shading row with weekend dates

    Hi John,
    Good idea on date formatting, I skipped over yours when
    I saw you'd got there first (BTW, same formula), not
    really looking at your date format with the space fill so it is
    justified on both left and right sides. I'll use that with ddd instead.
    Well actually I'd use yyyy-mm-dd*_ddd (_ used for spacebar)
    I see I already copied your suggestion to my datetime page
    from 2001-10-20 maybe I'll remember it this time.

    Had to delete mine because you beat me. Anyway second
    chance so I did also have link for additional information on Date and Time
    http://www.mvps.org/dmcritchie/excel/datetime.htm
    and I'll even include Chip Pearson's this time, different information
    http://www.cpearson.com/excel/datetime.htm

    "Dave Peterson" <[email protected]> wrote >
    > Ps. I like this custom format for dates like this:
    > mm/dd/yyyy*_dddd
    > (Underscore represents a spacebar)




  8. #8
    Dave Peterson
    Guest

    Re: Shading row with weekend dates

    There's a lot to remember on that page!

    Another one that is sometimes useful:

    mm/dd/yyyy<ctrl-j>dddd

    (hit ctrl-j instead of typing <ctrl-j>)

    set the cell for wrap text and adjust the rowheight and columnwidth manually.
    (autofitting won't work nicely.)


    David McRitchie wrote:
    >
    > Hi John,
    > Good idea on date formatting, I skipped over yours when
    > I saw you'd got there first (BTW, same formula), not
    > really looking at your date format with the space fill so it is
    > justified on both left and right sides. I'll use that with ddd instead.
    > Well actually I'd use yyyy-mm-dd*_ddd (_ used for spacebar)
    > I see I already copied your suggestion to my datetime page
    > from 2001-10-20 maybe I'll remember it this time.
    >
    > Had to delete mine because you beat me. Anyway second
    > chance so I did also have link for additional information on Date and Time
    > http://www.mvps.org/dmcritchie/excel/datetime.htm
    > and I'll even include Chip Pearson's this time, different information
    > http://www.cpearson.com/excel/datetime.htm
    >
    > "Dave Peterson" <[email protected]> wrote >
    > > Ps. I like this custom format for dates like this:
    > > mm/dd/yyyy*_dddd
    > > (Underscore represents a spacebar)


    --

    Dave Peterson

+ 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