+ Reply to Thread
Results 1 to 4 of 4

Networkdays and Conditional Formatting

  1. #1
    Registered User
    Join Date
    02-15-2007
    Posts
    2

    Networkdays and Conditional Formatting

    I'm trying to use the NETWORKDAYS() function as criteria in a conditoinal format. Keep getting a message that says you are not allowed to reference other worksheets or workbooks in conditional formatting criteria. I presume this has something to do with the NETWORKDAYS function being located in an add in (Analysis Toolpak), but I'm wondering if anyone knows anything about this? Is there a way around it? (BTW I am not referencing other worksheets or workbooks in the formula)..... Have a great day!

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Can you explain exactly what you are trying to apply conditional formatting to, so that we may be able to come up with an answer?
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719
    Quote Originally Posted by rth98122
    I'm trying to use the NETWORKDAYS() function as criteria in a conditoinal format. Keep getting a message that says you are not allowed to reference other worksheets or workbooks in conditional formatting criteria. I presume this has something to do with the NETWORKDAYS function being located in an add in (Analysis Toolpak), but I'm wondering if anyone knows anything about this? Is there a way around it? (BTW I am not referencing other worksheets or workbooks in the formula)..... Have a great day!
    That's right, you can't use any Analysis ToolPak functions in conditional formatting.

    One way round this is to place your NETWORKDAYS formula somewhere in the worksheet and then just reference that cell (or cells) in CF....or use a different function which doesn't require Analysis ToolPak which you can then use in Analysis Toolpak

    This will give you the same result as NETWORKDAYS where start date is A1 and end date is B1

    =B1-A1+1-INT((WEEKDAY(A1)+B1-A1)/7)-INT((WEEKDAY(A1-1)+B1-A1)/7)

    although if you want to exclude holidays you need a slightly more complex formula......

  4. #4
    Registered User
    Join Date
    02-15-2007
    Posts
    2
    Am a little behind the times... that was my first post to any forum (ever!) - didn't expect the interaction to occur so quickly.

    I have a simple task list on a spread sheet. I wanted the rows to change colors as my tasks get one, four or seven days away from their due date - but I needed these days to be BUSINESS days.

    daddylonglegs formula works beautifully. It is just a tad unwieldy, so I created a VBA function based on it and that works in CF just fine.

    Now the sun is shining and the birds are singing (at least until a couple of holidays come up and I feel the need to make this thing account for those too.......)

    Thanks and have a fabulous day.

+ 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