+ Reply to Thread
Results 1 to 10 of 10

Add Jobs to rows on Calendar that are on Weekdays only OR Weekends only

  1. #1
    Registered User
    Join Date
    01-15-2017
    Location
    LONDON, ENGLAND
    MS-Off Ver
    Excel Mac 2011 14.6.6
    Posts
    55

    Add Jobs to rows on Calendar that are on Weekdays only OR Weekends only

    Hi,

    I need to add some extra functionality to a function that looks at a date range (K:L) from a list of work orders and adds Job_Codes (T) to a calendar.

    The original formula I'm using was given to me on a previous thread:

    https://www.excelforum.com/excel-for...-priority.html

    The actual code I ended up using is below:
    NB: This formula uses Names so will only make sense along with the attached example

    Please Login or Register  to view this content.
    (which I adapted very slightly from the second code given to me on the thread)



    I've since added a new column (M) 'Work_Days' in the work order which has options of: "All Days", "Weekdays", "Weekends" & "".

    See attached Example

    I need to adapt the function somehow so that it assesses this new column and only adds Job_Codes (T) to the calendar that are on the selected type of days (M) between the date range (K:L).

    i.e.
    "Weekdays" only populates Mon, Tue, Wed, Thu, Fri
    "Weekends" only populates Sat ,Sun
    "All Days" populates every day (This is current behaviour)
    "" populates no days

    Thanks in advance for any help with this.
    Attached Files Attached Files
    Last edited by leovfx; 06-22-2017 at 04:50 AM.

  2. #2
    Registered User
    Join Date
    01-15-2017
    Location
    LONDON, ENGLAND
    MS-Off Ver
    Excel Mac 2011 14.6.6
    Posts
    55

    Re: Add Jobs to rows on Calendar that are on Weekdays only OR Weekends only

    As a note, I should also add that my existing formula could do with some stripping back a bit.

    I think there is some unnecessary IFs in there based on the Status column, that I no longer need.

    The only effect that the Status column should have is that Job_Codes should be added to the calendar if Status is either "Pencil" or "Confirmed" and not added if Status is "Cancelled' or "".

    (Which is a decision I made after receiving help with this on the previous thread - hence using the second answer and not the final one)

    I'm just not too good with array formulas yet so don't understand fully enough how to remove these bits.

  3. #3
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Add Jobs to rows on Calendar that are on Weekdays only OR Weekends only

    Try the following array entered formula*:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *1) Select cell W11,
    2) Paste the formula into the formula bar,
    3) Activate by simultaneously pressing the Ctrl, Shift and Enter keys,
    4) Copy down to W15 and (while the range W10:W15 is still selected) across to AC15.
    Test by changing M3 to 'Weekends','All Days' etc.
    Note: The formula already seems to address the concern raised in post #2 (this thread).
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  4. #4
    Registered User
    Join Date
    01-15-2017
    Location
    LONDON, ENGLAND
    MS-Off Ver
    Excel Mac 2011 14.6.6
    Posts
    55

    Re: Add Jobs to rows on Calendar that are on Weekdays only OR Weekends only

    Thank you. That is perfect

    Could you please help me with one additional change to this function?


    I have since added in several more status options (see attached for most recent workbook)

    Whereas the status could previously only be "Pencil", "Confirmed", "Cancelled" or ""

    Status can now be "Pencil", "Confirmed", "Cancelled", "Invoiced", "Paid" or ""


    If set to "Pencil", "Confirmed", "Invoiced" or "Paid" data should populate to calendar.

    If set to "Cancelled" or "" data should be ignored by calendar.


    Thanks again for your help!
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Add Jobs to rows on Calendar that are on Weekdays only OR Weekends only

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.

  6. #6
    Registered User
    Join Date
    01-15-2017
    Location
    LONDON, ENGLAND
    MS-Off Ver
    Excel Mac 2011 14.6.6
    Posts
    55

    Re: Add Jobs to rows on Calendar that are on Weekdays only OR Weekends only

    EXCELLENT! Thanks!

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Add Jobs to rows on Calendar that are on Weekdays only OR Weekends only

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

  8. #8
    Registered User
    Join Date
    06-22-2017
    Location
    New York
    MS-Off Ver
    2010
    Posts
    6

    Re: Add Jobs to rows on Calendar that are on Weekdays only OR Weekends only

    Hello,

    I have been browsing some excel forums looking for a way to turn data into a calendar and so far this is the closest thing I have found to what I am looking for. I made a new thread a few days ago and got a great response but I am also looking here for some help. I am wondering if it would be possible for someone to help me edit the file you have attached above to change a few things:

    1) Have every day be able to to hold 10 rows for jobs.
    2) Only have 4 columns for data entry (Job Name, Start Date, End Date, Weekdays/Weekends/All Days)
    3) I do not need the data validation section but I see that it is being used for the conditional formatting
    4) Have Saturday to the left of Monday.
    4) If possible, can jobs that are on consecutive days merge horizontally across cells so the job name is written once for a weekday instead of 5.

    Any help would be greatly appreciated. I love the document that you posted and would love to be able to customize it to fit my needs.

    -Drew

  9. #9
    Registered User
    Join Date
    01-15-2017
    Location
    LONDON, ENGLAND
    MS-Off Ver
    Excel Mac 2011 14.6.6
    Posts
    55

    Re: Add Jobs to rows on Calendar that are on Weekdays only OR Weekends only

    Hello.

    I need help to develop this formula a bit further if possible

    It's been serving me well up until now, but I now need to add functionality to include a list of defined Holiday days and treat these as weekend days.

    My list of Holiday days is the range $B$52:$B$70

    So the holiday dates should be used when Work_Days="Weekends" or "Every_Day" and not used when Work_Days="Weekdays"

    My adapted version of the code I was given above now looks like this (in cell BP28):

    Please Login or Register  to view this content.
    I've attached my most recent version of the workbook which has developed quite significantly since the last post.

    If you look at the booking for Company A (in the row of I23) between dates 20/12/2017 and 31/12/2017 and compare to the Calendar view on the right, you'll see that the dates 25/12/2017 & 26/12/2017 need to be displaying the booking (as M23 is set to weekends) and 25/12/2017 & 26/12/2017 are listed in my Holiday Range in $B$52:$B$70.

    (Currently the booking only displays on the weekends and not on Christmas Day & Boxing Day as desired)


    I've been adapting other bits of code I have using NETWORKDAYS.INTL to specify the holiday range, but I can't figure out how to do it for this code.


    Massive thanks in advance for any assistance on this.
    Attached Files Attached Files
    Last edited by leovfx; 09-13-2017 at 10:36 AM. Reason: Edited to include code for more relevant cell

  10. #10
    Registered User
    Join Date
    01-15-2017
    Location
    LONDON, ENGLAND
    MS-Off Ver
    Excel Mac 2011 14.6.6
    Posts
    55

    Re: Add Jobs to rows on Calendar that are on Weekdays only OR Weekends only


+ 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] Look down table and add Jobs to rows on calendar (in status priority)
    By leovfx in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-13-2017, 05:37 PM
  2. Replies: 3
    Last Post: 06-28-2016, 11:21 AM
  3. [SOLVED] SUMIFS for weekdays/weekends
    By Davzx in forum Excel General
    Replies: 5
    Last Post: 09-27-2015, 11:56 AM
  4. Turning weekends into weekdays?
    By bobing in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-16-2013, 06:34 AM
  5. WEEKENDS VS. WEEKDAYS
    By TLAngelo in forum Excel General
    Replies: 0
    Last Post: 07-10-2006, 02:04 PM
  6. WEEKENDS VS. WEEKDAYS
    By TLAngelo in forum Excel General
    Replies: 7
    Last Post: 05-12-2006, 12:35 PM
  7. IF statement with Weekends vs. weekdays
    By edwardpestian in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-07-2006, 04:13 PM

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