Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calculate 2 days back (2000)

    how to calculate 3 days bak refered today....
    I have a var_now (dim as date) is today date, i want to caculate a new date of 3 working days bak and the store the new date in var_3day (dim as date)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Calculate 2 days back (2000)

    In Excel, select Tools | Add-Ins...
    Tick the check box for 'Analysis ToolPak - VBA'.
    Click OK.
    Activate the Visual Basic Editor.
    Select Tools | References...
    Tick the check box for atpvbaen.xls.
    Click OK.
    You can now use the Workday function:

    var_3day = Workday(var_now, -3)

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calculate 2 days back (2000)

    WOW! WORK PERFECT...
    And tks for exaplin....i just have set the add 'Analysis ToolPak - VBA'.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •