+ Reply to Thread
Results 1 to 7 of 7

VBA - Changing Roster Vaules

  1. #1
    Registered User
    Join Date
    03-10-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    79

    Exclamation VBA - Changing Roster Vaules

    Hi All,

    I have posted a problem last year, still have not worked it out. I need this to work asap. I thought I re-post it. The link is below.

    http://www.excelforum.com/excel-prog...er-vaules.html

    When a employee goes on leave and a relief employee covers them, i would like the code to find the cell data in "Roster" sheet and put it to the relief employee name. The code below does do what I like it but at moment i have "SW" (shift swap) instead of the employee roster shift. How do I find the cell data in employee on leave from roster and and put it to relief employee?

    Any help will be appreciated! Not sure if I breached any forum rules, I'm sorry in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA - Changing Roster Vaules

    Can you give an example of the final result you need using your file attached
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    03-10-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    79

    Re: VBA - Changing Roster Vaules

    Sure, I use the previous attachment as an example.

    Employee 1 has taken leave from 20 Aug 2014 until 23 2014. The relief Employee 6 has to come off his line to cover him.

    Employee 6 current roster: / O O O
    Employee new roster (cover Employee 2): D D N N

    In this case, I will need to change before and after roster manually because he can't work N before the D.

    Employee 2 has taken leave from 9 Sep 2014 until 20 Sep 2014. The relief Employee 5 has to come off his line to cover him.

    Employee 5 current roster: D D N N / O O O D D N N
    Employee new roster (cover Employee 2): / O O O D D N N / O O O

    If it's confusing, I will attache new spreadsheet with updates.

    Thanks.

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA - Changing Roster Vaules

    Try and comment
    Modif are mentioned with ' *****
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-10-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    79

    Re: VBA - Changing Roster Vaules

    PCI,

    WOW... works like a dream! Can't thank you enough!

    Just 1 more quick question before I mark it SOLVED, to visually tell my staff on roster I have swap lines, I made each team a colour. After the macro been run, is there anyway to automatically format cells to match the team colour (August & September only for example)....? Do I use condtion formatting? I feel there are too many aruments, I may have to use Interior.ColorIndex in VBA.

    I might be pushing it, I'm already grateful for your help.
    Attached Files Attached Files
    Last edited by Bloodywog; 08-16-2014 at 09:12 PM. Reason: Add attachment

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: VBA - Changing Roster Vaules

    Conditional format can be a good choice: What are the arguments to use and which cells you want to paint?
    Perhaps it will better to open a new thread : People looking for inormation could be confusied with the first need.
    BTW:
    You know you could put formulas to prepare dates and not entering values manually.
    Something like Date(WkY,WkM,WkD) where WkY = year(Previous date), WkM = Month(Previous date)+1, WkD = Previous date + 1
    Last edited by PCI; 08-17-2014 at 02:18 AM. Reason: Typo

  7. #7
    Registered User
    Join Date
    03-10-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    79

    Re: VBA - Changing Roster Vaules

    Thanks so much for the help PCI!

    I will start the new thread, I try few things first.

+ 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. [SOLVED] VBA - Changing Roster Vaules
    By Bloodywog in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-17-2014, 03:25 AM
  2. Changing vaules according to date selected
    By Dan Mackman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-26-2007, 03:14 PM
  3. Changing a roster on a weekly basis
    By tug in forum Excel General
    Replies: 0
    Last Post: 05-27-2007, 08:26 AM
  4. Replies: 5
    Last Post: 05-03-2006, 03:15 PM
  5. [SOLVED] Truning 0 vaules red
    By bz in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-31-2006, 06:30 PM

Tags for this Thread

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