+ Reply to Thread
Results 1 to 8 of 8

staff rota date and day calculation

  1. #1
    Registered User
    Join Date
    05-16-2010
    Location
    gloucester, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    staff rota date and day calculation

    hey all, trying to help out me mum , she is doing staff rotas at work. now i can do a few things in excel (far from knowing much!) . just wondering if there is a quick way.

    what i want to do is :

    Month / Year January 2010

    coloum 1 coloum 2

    1st monday
    2nd tues

    etc etc

    now i know this will change each month, so is there a way to calculate what days etc corrospond by just putting in what month and year it is. so it automaticly does coloum 1 and 2?

    right hope i explained that right, confusing myself!
    Last edited by rich9989; 05-16-2010 at 05:11 PM.

  2. #2
    Forum Contributor
    Join Date
    09-05-2009
    Location
    Cologne, Germany
    MS-Off Ver
    Excel 2010
    Posts
    156

    Re: staff rota date and day calculation

    If I understand you correctly, you could simply type the date, for example 01/01 in cell A1 and the corresponding day in B1 and then highlight both by left clicking A1, hold the mouse button and drag to B1 and then release the button. In the resulting highlighted cells, hover over the very bottom right hand corner of B1 until your cursor changes to a cross and then drag down as far as you need to for each month (ie. to row 31 for January). Hope that helps.

  3. #3
    Forum Contributor
    Join Date
    05-16-2010
    Location
    UK
    MS-Off Ver
    2003 and 2007
    Posts
    252

    Re: staff rota date and day calculation

    Please see attached. Is this what you meant?
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-16-2010
    Location
    gloucester, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: staff rota date and day calculation

    thats perfect! thanks a million, by chance is there anyway i could make it skip weekends and only show weekdays, just for reference

  5. #5
    Forum Contributor
    Join Date
    05-16-2010
    Location
    UK
    MS-Off Ver
    2003 and 2007
    Posts
    252

    Re: staff rota date and day calculation

    Please see attached.
    Attached Files Attached Files

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,694

    Re: staff rota date and day calculation

    Just a small point on the original version......if you use this formula

    =IF($A5="","",IF(MONTH($A5+1)>$A$2,"",$A5+1))

    Then when A2=12 that won't prevent the next month showing because 1 < 12

    Of course as you know that's only a problem for December you could just keep A36 blank as you won't need that cell for any month......or a subtle change.....

    =IF($A5="","",IF(MONTH($A5+1)<>$A$2,"",$A5+1))

    You need to use the same sort of change to the weekday formula to make December work, although you could possibly utilise WORKDAY function, e.g. in A6 copied down

    =IF($A5="","",IF(MONTH(WORKDAY(A5,1))<>A$2,"",WORKDAY(A5,1)))

    WORKDAY is built in in Excel 2007 and later but for earlier versions you need Analysis ToolPak add-in available

  7. #7
    Forum Contributor
    Join Date
    05-16-2010
    Location
    UK
    MS-Off Ver
    2003 and 2007
    Posts
    252

    Re: staff rota date and day calculation

    daddylonglegs,

    An oversight on my part. I've updated the RotaDate2 workbook (which included the same oversight ). This workbook RotaDate2 already incorporated the WEEKDAY function. I've made one change as you highlighted in RotaDate3:

    MONTH($A5+1)>$A$2 reads MONTH($A5+1)<>$A$2

    WEEKDAY is valid for previous versions of Excel - definitely 2003 but I'm not sure on others.
    Attached Files Attached Files
    Last edited by pb71; 05-18-2010 at 06:02 PM.

  8. #8
    Registered User
    Join Date
    05-16-2010
    Location
    gloucester, England
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: staff rota date and day calculation

    wow thats great, i really need to read up on excel, seems im gonna be using it alot more. time to learn i think!. thanks a million!

+ 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