+ Reply to Thread
Results 1 to 7 of 7

Multiple column NETWORKDAYS functions with SUM and IF function

  1. #1
    Registered User
    Join Date
    11-01-2018
    Location
    London, England
    MS-Off Ver
    16
    Posts
    14

    Multiple column NETWORKDAYS functions with SUM and IF function

    Hi all

    I am trying to create a spreadsheet which calculates how many days overdue a folder has been submitted, and also tells the administrator which day the folder should be chased. This needs to exclude weekends, however, the spreadsheet includes multiple columns which should interact with each other as attached

    As this spreadsheet is used daily by someone with a busy work schedule I would ideally like to only need to input the due date and return date for ease

    Both the chase day and days overdue need to exclude weekends

    The days overdue already contains a formula which is the Return date minus the Chase day

    The Chase day is always the due date + 7 minus weekends

    So I want the spreadsheet to have formulas in each column with these functionalities:

    Due date: manually entered date by the admin
    Chase day: Due date + 7 minus weekends
    Return date: manually entered by the admin
    Days overdue: Return date - chase day minus weekends

    I also need to include an IF function so that if one of the sections is left blank (as sometime happens) the formulas do not return any result (so IF(G7>0)) WITHOUT using conditional formats because the spreadsheet also contains dropdowns, and if someone uses the dropdown I don't want it to corrupt the conditional formatting which can sometimes happen (unless someone knows a fix for this?)

    I have tried a few ways of doing this already but I always find that one part will succeed and the other will fail

    Thank you in advance for the help!

    Dates spreadsheet.png

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,962

    Re: Multiple column NETWORKDAYS functions with SUM and IF function

    With your example table in A1:Dxxxx, use this in cell B2, formatted for date:

    =WORKDAY(A2,7,Holidays)

    and this in cell D2, also formatted as a date

    =IF(C2="","",NETWORKDAYS(B2,C2,Holidays))-1


    This assumes that you have a list of holiday dates that you have named "Holidays" - if you want to ignore holidays, take out the ,Holidays from each of these.

    Note, too, that your "Days Late" is actually "Days after chase started" - actual Days Late would be

    =IF(C2="","",NETWORKDAYS(A2,C2,Holidays))-1
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    11-01-2018
    Location
    London, England
    MS-Off Ver
    16
    Posts
    14

    Re: Multiple column NETWORKDAYS functions with SUM and IF function

    That's great, I had to make a couple of changes to match my spreadsheet but otherwise it worked perfectly! Seems I was halfway there, just missing a few key parts of the formulas

    Thank you so much for your help!

    Out of interest, IS there a way to prevent conditional formatting from being corrupted by a filter? I know it will probably involve adding VBA code, but knowing this would be really helpful in the future.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,962

    Re: Multiple column NETWORKDAYS functions with SUM and IF function

    I have never seen a filter that corrupted conditional formatting - drop downs don't either. Copying and pasting will - could you attach an example where you think the CF is corrupted?

  5. #5
    Registered User
    Join Date
    11-01-2018
    Location
    London, England
    MS-Off Ver
    16
    Posts
    14

    Re: Multiple column NETWORKDAYS functions with SUM and IF function

    Hi Bernie

    I have attached an image to show you what happens on some of my spreadsheets when I use a filter on it.

    As you can see, the bottom three conditional formats have populated multiple ranges - originally there was only one range each.
    It is as if the filter confuses the format range and moves it around the page and multiplies it.

    Maybe I have too many conditional formats on these tables?



    conditional formats.jpg

  6. #6
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,962

    Re: Multiple column NETWORKDAYS functions with SUM and IF function

    That issue is usually created by row insertions not being properely handled by Excel. To fix that, usually, you can delete CF from all but the top row, then copy the top row and paste formats to all rows (including the top row).

  7. #7
    Registered User
    Join Date
    11-01-2018
    Location
    London, England
    MS-Off Ver
    16
    Posts
    14

    Re: Multiple column NETWORKDAYS functions with SUM and IF function

    Perfect, you've solved it for me! Thanks very much!

+ 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. Finding work day lead time using networkdays function across multiple sheets
    By artistictiger300 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2017, 12:39 PM
  2. [SOLVED] Looking for a Formula Using the IF and NETWORKDAYS.INTL Functions
    By dharvey078 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-01-2017, 07:47 AM
  3. IF the right function? Multiple functions maybe?
    By bzymom in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-10-2015, 05:38 PM
  4. IF Function with multiple functions
    By C14389 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-22-2012, 05:16 PM
  5. Combining multiple functions into one function
    By coryjapan in forum Excel General
    Replies: 1
    Last Post: 04-14-2011, 06:07 PM
  6. Change WEEKDAY, NETWORKDAYS functions for other cultures
    By tpillow in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-30-2009, 07:39 AM
  7. multiple functions vs. one function
    By labrite34 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 11-24-2008, 07:17 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