+ Reply to Thread
Results 1 to 5 of 5

WORKDAY function

  1. #1
    Registered User
    Join Date
    12-07-2007
    Posts
    2

    WORKDAY function

    Hi,

    I'm not new to Excel but now I have to create something I have not done before. It should be possible but I don't know how.. Anyone can help me out a little? Many thanks!

    1st:
    Anytime a value in cell A1 is modified, the value of cell B1 should be automagically filled with the current date + time.

    2nd:
    Cell A1 has 4 possible values (combobox): 1, 2, 3, 4 (days).
    Cell B1 has a date as value
    Cell C1 has a status as a value which should be calculated: ok, not-ok.

    The status should be calculated as follows:
    - If the current date minus the date from cell B1 is greater than the value of cell A1 then the value of cell C1 is 'not-ok'.
    - If the current date minus the date from cell B1 is smaller than the value of cell A1 then the value of cell C1 is 'ok'.

    To make it a bit more interesting for you guru's. As we are talking about dates here, it would be awesome if the formula also excludes weekends. So Mon-Fri = 1 and Sat-Sun = 0.

    Basically I want to set a priority for executing a process at a planned date. The amount of days for the process to complete is based on the priority set.
    I'm now able to see an overview of my planning with objects that are ok and objects that are not ok (days exceeded).

    Many thanks!

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    gn!uz

    Welcome to excelforum


    Please read forum rules (rule 1) & use suitable thread titles

    A thread with the rules is available at the top of each forum or see link below for rules
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719
    For the first part I think you'd need VBA, not really my area of expertise but I'm sure somebody else can point you in the right direction......

    For the second part you could use the WORKDAY function which excludes weekends, i.e. in C1

    =IF(WORKDAY(B1,A1)<TODAY(),"Not OK","OK")

    Note: Workday function is aprt of Analysis ToolPak add-in. If you don't have that installed try:

    Tools > Add-ins > Tick "Analysis ToolPak" box

  4. #4
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    For the 1st part you will need VBA macro

    This will not work if Macro Security is set to High

    'These instructions pre typed & are worded to cater for the novice programmer
    'To install macro to correct location

    'Copy this macro
    'GoTo Excel
    'Select sheet this is to appy to
    'Right Click on Sheet Name Tab > select View Code
    'Past macro into the Worksheet Module displayed

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-07-2007
    Posts
    2
    You guys are great! Thanks.. And sorry for not reading the rules.. I will go through them!

    I'll see what I can do to figure this one out with the info above and let you know. Thanks

+ 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