+ Reply to Thread
Results 1 to 16 of 16

Getting information from staff rota

  1. #1
    Registered User
    Join Date
    09-24-2012
    Location
    England
    MS-Off Ver
    2013
    Posts
    55

    Getting information from staff rota

    Each month we get a new rota made, with all of the staff team and different locations. There's nothing else that happens with the rota after it's been made, but I think that there are a few thing's that could be done with it, from automating some time sheet information, running a formula that would enable one to see just how many shift's a person has worked in a month etc.

    It would also be good to be able to make a 'functional' rota from the information of this one. By functional I mean one that just had the information relevant to the actual day, and anyone who was off for that shift wouldn't show on the functional rota.

    I'm not too sure what formula's are applicable for this type of thing.

    The rota encompasses the whole company, but there are essentially 7 sections, representing different locations.

    I think that this is probably a vague description and I'm sorry if Its no use, thought I'd ask though.

    cheers

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Getting information from staff rota

    I'm not quite sure what a rota is, but it sounds like a schedule.

    You might want to look into the use of an advanced filter macro that copies relevant information from a data source tab, depending on any given criteria.

    Another option might be to use a helper column to test each row for True/False given any set of parameters such as date, name, title, etc and then use a button that filters by the True to only display what's relevant.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Getting information from staff rota

    Hi,

    Difficult to be specific without seeing your workbook but don't ignore Pivot Tables which may be relevant in your case.

    Otherwise daffodill11 has given you a succinct precis of the way forward.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    09-24-2012
    Location
    England
    MS-Off Ver
    2013
    Posts
    55

    Re: Getting information from staff rota

    Cheers for the response, here's an example of the rota :

    \1

    That's only for one location though, there are 39 staff in total, and some locations have more staff that others (this location only has one staff member on at a time, another has 4)

    Not sure how to upload the workbook on here (dropbox link...?)

    Is this what you guys expected?

    As you can see on this it's 24 support - the client is never without staff. Also, there are quite a few 'off' entries, which aren't really relevant to staff when we are referencing the rota, so a way to have a version that automatically condensed the information to what was relevant might be useful. I'm not sure how that would work out though, if another kind of table layout would have to be used to enter the information?

    I'll have a look at pivot tables, thanks.

    Advanced filter macro sounds good too.

    Does seeing this table give any further insight?

    Thanks.

  5. #5
    Registered User
    Join Date
    09-24-2012
    Location
    England
    MS-Off Ver
    2013
    Posts
    55

    Re: Getting information from staff rota

    So here's one example of what could be useful with the information

    \1

    that at a glance would show anyone looking who was on the early shift and who was on the late... I've done this manually though (the shame....) I'm not sure If I'd want a hlookup or something to get this information? Would I have to make a table with the shift pattern's and use that as a reference...?

    I'm really bad sorry.

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Getting information from staff rota

    Here's an example of each I've made for users in the past.

    This uses the filter-in-place macro:
    Parts List - Autosort Macro.xlsm


    This allows is pulling from another tab and printing by date range:
    adv filter macro - finished.xlsm

    To attach a file, go to 'Go Advanced' next to the Submit button. Then on the new page scroll down to attachments, upload from source, and then insert in line.

    Depending on how your source formatting is done, HLOOKUP, VLOOKUP, or INDEX(..MATCH( could all be potential solutions as well.

  7. #7
    Registered User
    Join Date
    09-24-2012
    Location
    England
    MS-Off Ver
    2013
    Posts
    55

    Re: Getting information from staff rota


  8. #8
    Registered User
    Join Date
    09-24-2012
    Location
    England
    MS-Off Ver
    2013
    Posts
    55

    Re: Getting information from staff rota

    Just had a look at those two daffodil - they're both great!

    The rota is always printed out so we don't always have the flexibility - but I can see a timesheet being automated using one of these! As well as perhaps generating some searches.

    The source formatting is done like in the example I gave - staff in column 1, date on row 1 then the shifts filled in the array. Would that more more VlookUp than HLookUp or more HlookUP than VLookUp? Im unsure... What formula would I use to create the table underneath the Location Tester street part?

  9. #9
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Getting information from staff rota

    Actually, we can bypass the whole filter.

    Instead, plop this bad boy into C13:

    =INDEX($A$2:$A$5,MATCH("*"&$B13&"*",OFFSET($A$2:$A$5,0,MATCH(C$12,$B$1:$H$1,0)),0),0)

    And copy down and over as needed. You will just need to change B13 and B14 to E and LS respectively.

    To have your date ranges update, instead make C12 =TODAY() and then D12 = C12+1, E12 =D12+1, etc and then upon opening the workbook you'd just need to hit F9 to refresh all formulas to update to current date + whatever stretch of days you want to look at.

    Edit: Added my example

    Rota is English for Schedule.xlsx
    Last edited by daffodil11; 12-10-2013 at 04:04 PM.

  10. #10
    Registered User
    Join Date
    09-24-2012
    Location
    England
    MS-Off Ver
    2013
    Posts
    55

    Re: Getting information from staff rota

    Hey daffodil - argh that's great! I had to change the names of the shift pattern in B13:B14 from Early Late to E L, but then it popped up fine.

    I'm going to take a bit of time to actually process that formula now, nice one.

  11. #11
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Getting information from staff rota

    Here's a nifty tip you can use whenever you run into formulas you don't quite understand:

    You can select portions of a formula within the Formula Bar and hit F9 to have it calculate just that piece. (Just be sure to exit the cell with Escape instead of Enter.)

    The formula I used breaks down like this:

    =INDEX($A$2:$A$5,MATCH("*"&$B13&"*",OFFSET($A$2:$A$5,0,MATCH(C$12,$B$1:$H$1,0)),0),0)

    =INDEX(what table of data,what row #, what column #) so that if we used INDEX(A1:C3,2,3) it would output whatever is in B3 - the 2nd row and 3rd column of A1:C3

    In your table, we're just referencing a single column, so the parameters are INDEX(A2:A5,something,0)

    Onto that something:

    Let's start with the deepest MATCH. The match looks for the date in top row and returns a number that notates how many columns over it went to find it.

    Next - OFFSET. We need to look for the matches of E and L in a single column, but that column is different depending on the date. We start with a base range of A2:A5, and we offset that range by the date match to B1:H1. OFFSET's parameters are (range, # of rows, # of columns). We aren't shifting the range up and down, but we are shifting columns. This means when it finds a match for date three columns over, it changes the A2:A5 to D2:D5.

    Last, we get to the code match. We're using wildcards * to look for any variation of what we're looking for. Similarly if A2 = bob123, and we did MATCH("*"&"BOB"&"*",a1:a5,0) it would return a 2, because it still sees the something+bob+something. Our match is looking for the code in the offset range, and it returns the row it found it on.


    We put it all together and we get INDEX(list of names,row # code match,0) which returns the right name.


    Using what I said initially, go into the formula in C13 and highlight just =INDEX($A$2:$A$5,MATCH("*"&$B13&"*",OFFSET($A$2:$A$5,0, MATCH(C$12,$B$1:$H$1,0) ),0),0) and hit F9.

    Now highlight =INDEX($A$2:$A$5,MATCH("*"&$B13&"*", OFFSET($A$2:$A$5,0,10) ,0),0)

    Again on =INDEX($A$2:$A$5, MATCH("*"&$B13&"*",{"off";"ls";"e";"off"},0) ,0)


    =INDEX( $A$2:$A$5 ,3,0)

    The final result is the 3rd row option of {"Mike";"Claire";"Sally";"Sue"}

  12. #12
    Registered User
    Join Date
    09-24-2012
    Location
    England
    MS-Off Ver
    2013
    Posts
    55

    Re: Getting information from staff rota

    EDIT - It works if I change if from an array to a column! I'm going to keep working through your explanation for a bit now

    Hey Daffodil, thanks so much for the explanation. I'm just going through it at tonight, I just tried to use MATCH function myself but it returns an N/A.

    When I evaluate the formula it say's that the cell being evaluated contains a constant...? I'm not too sure what this means, apparently (according to some on the net) it means that I have tried to enter information on a cell that has been formatted to Text or something, but mine definitely isn't, the value is definitely in the array and there are no spaces or whatnot following the information.

    I've tried to look up the value 'mars' in the array E6:G8 in this example.

    MatchFunction.xlsx
    Last edited by Managerwork; 12-11-2013 at 04:45 PM.

  13. #13
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Getting information from staff rota

    MATCH works for a single column or row only.

    The use of OFFSET identifies the column to use.

    Essentially, one MATCH picks the right column, and then the second MATCH finds the right row.

  14. #14
    Registered User
    Join Date
    09-24-2012
    Location
    England
    MS-Off Ver
    2013
    Posts
    55

    Re: Getting information from staff rota

    Quote Originally Posted by daffodil11 View Post
    MATCH works for a single column or row only.

    The use of OFFSET identifies the column to use.

    Essentially, one MATCH picks the right column, and then the second MATCH finds the right row.
    Yeah I've just been going through it a few times it's so logical and good

    However I'm struggling to adapt this formula to a different location (maybe it's not adaptable ...

    The location I'm struggling with has a higher staffing level - there is generally 2 on an early shift, 2 on a late, one on a MID (that over laps the early and late) and often one more more on management days.

    I'm not sure how to represent that using this formula without having a different labelling in the actual rota itself, ie Late1, Late2, MG1, MG2.... The only problem with this is that I won't be able to get the person who actually makes the rota to do this, they'll get confused and it'll end up being a chore.

    I'll make and attach an example now so you know what I mean.

  15. #15
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Getting information from staff rota

    Ok, I'll take a crack at it when you post it.

  16. #16
    Registered User
    Join Date
    09-24-2012
    Location
    England
    MS-Off Ver
    2013
    Posts
    55

    Re: Getting information from staff rota

    Here's an example of the Main Unit rota... I've changed all names and stuff so I'm not breaking and confidentiality laws!

    Perhaps there are some thing's that could be changed at source. So on the main rota there are other locations underneath this one, and say for location GT there would be an entry in the staff column called 'cover' and on Sun 1 and Mon 2 Ian would be in the cells for that location in the cover section. And they would say 'ls ID' (Ian Davis) and 'E ID' (Early Ian Davis)


    MainUnitStaffRotaExample.xlsx

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Staff rota
    By chelfox in forum Excel General
    Replies: 1
    Last Post: 10-07-2013, 11:25 AM
  2. Staff Rota
    By parkey5 in forum Excel General
    Replies: 5
    Last Post: 07-14-2013, 04:16 AM
  3. Creating a staff rota
    By daustin3 in forum Excel General
    Replies: 0
    Last Post: 05-16-2012, 12:30 PM
  4. Staff Rota Count Help!!
    By derhandy in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 09-10-2010, 06:19 AM
  5. Staff rota
    By goofy14you in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2007, 04:13 PM

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