+ Reply to Thread
Results 1 to 5 of 5

Change a working shift to a time

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    102

    Change a working shift to a time

    Hi,
    In Cell A1 I have the date. In Cell B1 is the shift. There are three shifts labeled as 1, 2, and 3. Is it possible to create a rule that will convert 1 to 0700, 2 to 1500, and 3 to 2300? Below is an example of how I need the shifts converted to time (military).

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Change a working shift to a time

    make a table with the data

    e.g. H1:I3

    1 0700
    2 1500
    3 2300

    Then use VLookup to find the data in the table.
    c1=vlookup($b1,$h$1:$i$3,2,0)
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    12-14-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: Change a working shift to a time

    Hi oeldere,
    Thanks for your reply. Is there a way to create a custom rule that will automatically convert the shift to a time?

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Change a working shift to a time

    You mean that the content of the cell in which you add the shift automatic will change?

    That is not possible with excel; it is possible with VBA.

    It can be done without an table, if that is your question.

    But I would solve it, for the flexibility, with an table.

  5. #5
    Forum Contributor
    Join Date
    12-14-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: Change a working shift to a time

    Thank you very much oeldere, you have answered my question.

+ 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. Working shift patter
    By dodger999 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-21-2013, 11:15 AM
  2. Replies: 4
    Last Post: 09-24-2013, 11:32 AM
  3. Need Help on Time Sheet Formula (Day Shift OK/Night Shift=Problem)
    By jomapac in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-18-2013, 02:26 AM
  4. Replies: 4
    Last Post: 09-21-2012, 12:58 AM
  5. Day shift/night shift time calculation issue
    By STATEXCEL in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-31-2007, 08:48 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