+ Reply to Thread
Results 1 to 12 of 12

Nested IFs and VLOOKUPs

  1. #1
    Registered User
    Join Date
    02-03-2009
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    30

    Nested IFs and VLOOKUPs

    Hi All

    I have a simple Staff Rote which is fed by data on Time Sheet. Currently it is working ok with two definitions;

    T : Time
    B: Break

    If I introduce a 3rd and 4th definition like;
    A: Leave
    X:non working day
    formule will get even more complicated.

    Is there a way of simpifying this with a code and introducing the new definitions.

    Please see attached workbook for a clear understanding.

    Many thanks for your help.

    Johny
    Attached Files Attached Files
    Last edited by Johny1; 02-12-2009 at 08:16 PM.

  2. #2
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Re: Nested IFs and VLOOKUPs

    Hi

    I had a look at your example and yes it works okay but as far as I can see only for Monday.

    Personally I would be inclined to use VBA to collate the necessary data and this could be linked to the day of the week cell so that when the day is changed so is the data.

    If you are interested in pursuing this line of thinking then let me know and I will draw up an example for you.

    regards

    Jeff

  3. #3
    Registered User
    Join Date
    02-03-2009
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Nested IFs and VLOOKUPs

    Hi Jeff

    Thanks for your reply.

    What you are suggesting makes sense and would be a very good start for me.
    Only one thing though, I need to be able to call the rota for any day of the week.

    I would greatly appreciate your help on this matter.

    Regards

    Johny

  4. #4
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Re: Nested IFs and VLOOKUPs

    Hi

    I will post an example a little later today when I have the time to work on it.

    Regards

    Jeff

  5. #5
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Re: Nested IFs and VLOOKUPs

    Hi Johny

    Please find attached a working version of your schedule sheet. This displays only staff working on a particular day, please let me know if this is what you intended.
    Adding times to the Time Sheet page is by drop down list to ensure that the code does not throw an error dur to a slightly incorrect time being entered.

    Regards


    Jeff
    Attached Files Attached Files
    Last edited by solnajeff; 02-09-2009 at 10:38 PM. Reason: Forgot attachment, plus more info.

  6. #6
    Registered User
    Join Date
    02-03-2009
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Nested IFs and VLOOKUPs

    Hi Jeff

    Excellent work.

    Thank you very much for your time end effort. It is brilliant as it is but can it display all staff and can I add "A" for "Leave" and "X" for non-working day.

    Many thanks again.

    Regards

    Johny

  7. #7
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Re: Nested IFs and VLOOKUPs

    Hi

    If you give me an example of how you wish to show 'Leave' or 'Non working days, I will add it to the code. I can give you the option to display all or 'working' only using a check box as the code is there anyway.

    Regards

    Jeff

  8. #8
    Registered User
    Join Date
    02-03-2009
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Nested IFs and VLOOKUPs

    Hi Jeff

    Thanks for responding again.

    I hape i am not taking up too much of your time.

    Here is the sample sheet which shows how I mark annual leave, nonworking days, training and other.

    Once again thanks for your help.

    Regards

    Johny
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Re: Nested IFs and VLOOKUPs

    Hi

    Actually as we are pulling data from the Time Sheet it is how you show the information there that is important, particularly in regard to training as if it is not a full day there needs to be a way to detect start and finish times.

    I have attached a revised version that can switch between the two available views.

    Regards

    Jeff
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-03-2009
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Nested IFs and VLOOKUPs

    Hi Jeff,

    I totally agree with you but my boss wants to see who is where on the sheet. Other than that showing Annual leave, non-working days etc does not add any value as only Ts and Bs are taken into the account.

    Many thanks for updating the sheet.

    I am grateful.

    Johny

  11. #11
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Re: Nested IFs and VLOOKUPs

    Hi

    Amended sheet as advised.

    Regards

    Jeff
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    02-03-2009
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Nested IFs and VLOOKUPs

    Hi Jeff

    Than ks for your help.

    I have been away for a while sorry for the delay.

    Revised schedule looks perfect.

    Thanks again for your time.

    John

+ 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