+ Reply to Thread
Results 1 to 12 of 12

Table that matches work shift hours to work shift codes

  1. #1
    Registered User
    Join Date
    10-21-2015
    Location
    Patra, Greece
    MS-Off Ver
    2007 standard
    Posts
    3

    Table that matches work shift hours to work shift codes

    Hello.

    I should apologize in advance for my lack of Excel knowledge. I'm aware that it will make explaining what i want a little more difficult. I hope you can still help me though.

    I want to create a table as so:

    Columns B to Y will be numbered following the hours of the day starting from 6 am (B1) and finishing at 5am (Y1)
    Column A is where the user will insert the code names of the shifts his staff members will work for the day

    Now what i want, is a formula under the hours columns that will recognize the shift code names entered and add +1 under that specific hours
    I am attaching an example where he has 6 employees working these shifts , i have manually entered the desired values that should correspond to those code names.
    There are 24 possible shift code names, though not all are used.

    Thanks in advance,

    Alex
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Table that matches work shift hours to work shift codes

    Hi Iliop,

    Welcome to the board.

    This should take care of the hours part of the table. In B1 enter this formula and fill across / copy across to Y1
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Apply formatting as h:mm AM/PM.

    I cannot follow requirements for the rest of the table, and I have not come up with anything that duplicates posted results, and I am at a loss to know what questions to ask. Can you elaborate? Any formula I come up with recognizes the shift code names. So every cell gets filled with something which is not what you want. Do you have another table that lists each shift code name with their valid work(?) hours?

    Edit I modified the formula to wrap around midnight. Before it incremented to the next day at midnight.
    Last edited by FlameRetired; 10-21-2015 at 04:54 PM.
    Dave

  3. #3
    Registered User
    Join Date
    10-21-2015
    Location
    Patra, Greece
    MS-Off Ver
    2007 standard
    Posts
    3

    Re: Table that matches work shift hours to work shift codes

    Hello Dave and thanks for the response. As i feared, i haven't explained this properly it seems.

    B1 to Y1 should be static, they just show the time of the day, from 6 am today to 5 am tomorrow.

    What i want, is that when the user enters one of the 24 possible shift codes on the A column, the boxes corresponding to the times of that shift code get a "1" under them.
    So, for example: If the user adds someone working the Π2 shift on the A4 box, then the boxes D4 to K4 should receive a "1" indicator while the rest of the 4th row remains blank. Then if he also has another person coming in one hour after the first, he will enter the Π3 shift code on A5, resulting in the boxes E5 to L5 getting the "1" indicator, leaving the rest of the 5th row blank. The sum at the end will let the user know that he will have one active member at 8 am and 4 pm and 2 active members in the hours between these 2.

    The code names they use for their shifts are fairly easy. They have 3 zones marked with the letters Π for the morning one, Α for the afternoon and Ν for the night. Their day begins at 6 am and Π is the first shift (6 am to 2 pm), then Π1 (7 am to 3 pm), Π2 (8 am to 4 pm) etc until Π7 (1 pm to 9 pm). A is 2 pm to 10 pm, then A1 (3 pm to 11 pm) etc until A7 (9 pm to 5 am). Finally N marks the shift from 10 pm to 6 am and it follows as before until N7 which is 5 am to 1 pm.

    I presume , in order to get the result i want, i need some sort of formula under the hours that will read the corresponding A-column entry and if it sees one of the names that fit that time it will give it the "1" indicator. So for example, in order for the B2 box to trigger the "1" indicator , it would need to read on the A2 column a name that includes that time, in this case N1-7 and Π. Anything else would leave that box blank.

    I hope it's a bit better explained now

    Apologies,

    Alex
    Last edited by Iliop; 10-21-2015 at 05:33 PM.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Table that matches work shift hours to work shift codes

    Iliop,

    I'm working on something that shows promise, however I am running into difficulties reconciling the Greek character set with American. This may take time.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Table that matches work shift hours to work shift codes

    Iliop,

    I am uploading what I have so far. It includes a lookup table for shift hours in AD2:AF25. The formula I use in C2:Y23 is
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    It works for any shift beginning with "Π". "N" and "A" fails.

    There are temporary "check" columns in A2:A7 (an inserted temporary column) and in AC2:AC25 that demonstrate the problem.

    I am going to see if I can get us some community help on this one.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Table that matches work shift hours to work shift codes

    A listing of the 24 codes would be an asset in helping you.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Registered User
    Join Date
    10-21-2015
    Location
    Patra, Greece
    MS-Off Ver
    2007 standard
    Posts
    3

    Re: Table that matches work shift hours to work shift codes

    Shift codes Start End
    Π 6:00 πμ 2:00 μμ
    Π1 7:00 πμ 3:00 μμ
    Π2 8:00 πμ 4:00 μμ
    Π3 9:00 πμ 5:00 μμ
    Π4 10:00 πμ 6:00 μμ
    Π5 11:00 πμ 7:00 μμ
    Π6 12:00 μμ 8:00 μμ
    Π7 1:00 μμ 9:00 μμ
    Α 2:00 μμ 10:00 μμ
    Α1 3:00 μμ 11:00 μμ
    Α2 4:00 μμ 12:00 πμ
    Α3 5:00 μμ 1:00 πμ
    Α4 6:00 μμ 2:00 πμ
    Α5 7:00 μμ 3:00 πμ
    Α6 8:00 μμ 4:00 πμ
    Α7 9:00 μμ 5:00 πμ
    Ν 10:00 μμ 6:00 πμ
    Ν1 11:00 μμ 7:00 πμ
    Ν2 12:00 πμ 8:00 πμ
    Ν3 1:00 πμ 9:00 πμ
    Ν4 2:00 πμ 10:00 πμ
    Ν5 3:00 πμ 11:00 πμ
    Ν6 4:00 πμ 12:00 μμ
    Ν7 5:00 πμ 1:00 μμ

    Copied from the file Dave posted. You've done so much in so little time, i am very thankful!

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Table that matches work shift hours to work shift codes

    I have advanced this down to N2 but have run out of time right now.
    Formula in Sheet1!B2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Lookup table on Sheet2
    A
    B
    C
    D
    2
    Π
    6:00
    πμ
    14:00
    3
    Π1
    7:00
    πμ
    15:00
    4
    Π2
    8:00
    πμ
    16:00
    5
    Π3
    9:00
    πμ
    17:00
    6
    Π4
    10:00
    πμ
    18:00
    7
    Π5
    11:00
    πμ
    19:00
    8
    Π6
    12:00
    μμ
    20:00
    9
    Π7
    13:00
    μμ
    21:00
    10
    Α
    14:00
    μμ
    22:00
    11
    Α1
    15:00
    μμ
    23:00
    12
    Α2
    16:00
    μμ
    0:00
    13
    Α3
    17:00
    μμ
    1:00
    14
    Α4
    18:00
    μμ
    2:00
    15
    Α5
    19:00
    μμ
    3:00
    16
    Α6
    20:00
    μμ
    4:00
    17
    Α7
    21:00
    μμ
    5:00
    18
    Ν
    22:00
    μμ
    6:00
    19
    Ν1
    23:00
    μμ
    7:00
    20
    Ν2
    0:00
    πμ
    8:00
    21
    Ν3
    1:00
    πμ
    9:00
    22
    Ν4
    2:00
    πμ
    10:00
    23
    Ν5
    3:00
    πμ
    11:00
    24
    Ν6
    4:00
    πμ
    12:00
    25
    Ν7
    5:00
    πμ
    13:00
    Attached Files Attached Files

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Table that matches work shift hours to work shift codes

    OK, this isn't as elegant as I would like but it works. The shaded area of the worksheet can/should be hidden. I have not hidden it so that you could see what is going on.
    In B2 enter this formula and copy across to AF2 then fill down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Table that matches work shift hours to work shift codes

    Please note that the codes given will NOT work if typed in. I should have mentioned before that the codes are not reproducible in any way other than copying and pasting them. I assume that these codes are produced by a computer set up for the Greek language. When I used the CODE function to determine what the character code was for these characters and then used the CHAR function to try and reproduce the character. Failure was the name of the game. So copying and pasting was how I got to be able to use the codes given.

    Another thing about the times given in the code list looked the same as in the Excel worksheet but they were different in a lot of cases so I created the times in the worksheet and then used the same formula to create the times. There must have been some very small differences in the serial numbers that didn't show after formatting was applied to show the times until I did this.

  11. #11
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2502
    Posts
    13,700

    Re: Table that matches work shift hours to work shift codes

    @newdoverman
    Thanks for covering all that.

    The time formula thing makes better sense than what I had originally thought .... that being the additional column in the lookup table. That apparently isn't an issue at all.

  12. #12
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Table that matches work shift hours to work shift codes

    Until I made absolutely sure that the times matched everywhere, as I filled the formula across and down, suddenly the values jumped a column to the right. This happened in a random manner so I just made sure that the times were calculated identically.

+ 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. Calculating hours that occur between certain times in a work shift
    By jkuoso in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 09-11-2015, 02:36 AM
  2. Replies: 3
    Last Post: 07-21-2013, 05:45 PM
  3. [SOLVED] Spliting Day Shift and Night Shift Hours
    By Goldbadger2 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-27-2013, 01:16 AM
  4. Replies: 4
    Last Post: 09-21-2012, 12:58 AM
  5. Calculating Hours Worked from Shift Begin and Shift End
    By lukeflegg in forum Excel General
    Replies: 5
    Last Post: 08-12-2011, 03:25 PM
  6. Program for assigning work shift hours
    By frankiee in forum Excel General
    Replies: 1
    Last Post: 03-09-2006, 11:00 PM
  7. [SOLVED] Need a function that separates over-lapping work shift hours.
    By Katybug1964 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-24-2005, 11:06 AM

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