+ Reply to Thread
Results 1 to 5 of 5

Staff Rota Array: Evaluate Multiple Columns

  1. #1
    Registered User
    Join Date
    05-10-2010
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2013
    Posts
    13

    Staff Rota Array: Evaluate Multiple Columns

    Hi All,

    I've got a staff rota table that has half hour increments as column headers. The first row header is whether the store is trading that time slot and then staff positions listed down beneath that. Each cell in the matrix has a 1 if the staff member is working that time slot (and 0 if they are not).

    In the totals column down the side, I have total hours worked (sum the 1's and divide by 2 to get hours). I'm trying to work out an array formula to sit next to that which will add up the hours that each staff member is on their own in the shop with customers (logic being that per half hour slot, the Store Trading row = 1, that Staff Member column = 1 AND all other cells in that column = 0). Obviously very easy to compare a single column - slightly harder when there are 60!

    Have played with the FREQUENCY formula to look at the columns that match the criteria but couldn't get it working. Basically what I think I need to do is to add each level of the array together (to be left with column totals) and then those which = 0 are what I need. Just can't for the life of me work out how to do that!!

    Any pointers in the right direction would be much appreciated.

    Cheers

    J

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Staff Rota Array: Evaluate Multiple Columns

    hi JoeByrne,

    an attachment would help us understand better
    =)

  3. #3
    Registered User
    Join Date
    05-10-2010
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: Staff Rota Array: Evaluate Multiple Columns

    Example.xls

    A good point! Not sure if I've got the upload system sorted but hopefully this works - see attached. Thanks for helping benishiryo...

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Staff Rota Array: Evaluate Multiple Columns

    at the botton of your data in Column C, add this formula, and copy across...

    =IF(AND(C3=1,SUM(C4:C14)>1),1,"")

    you can then add across in BM15 to give you the total

    let me know how this works for you?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    05-10-2010
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2013
    Posts
    13

    Re: Staff Rota Array: Evaluate Multiple Columns

    Thanks FDibbins,

    That does calculate when more than 1 staff member is working. Unfortunately, I'm trying to calculate for each staff member, how many hours they are lone trading. I could do it by customising the formula for each row - just wanted to know if it's possible to use an array so I can use a generic formula.

    Actually, you gave me an idea which has worked. I added a normal total row at the bottom of the data table and then used the following formula (from Cell BM4) which works well.

    =SUM(($C$3:$BJ$3>0)*(C4:BJ4>0)*($C$15:$BJ$15=1)*(C4:BJ4))/4

    Would still be interested to know how it could be done without the total column for learning sake, but otherwise would say this is solved. Thanks again!!

+ 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