Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 16th, 2005, 08:22 AM
Authorized User
 
Join Date: Oct 2005
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Vacancy Age

Hello, I have a slight problem. I have a colum that lists when a certain piece of work came in so column d = confirmation date. Colum e is confirmation age and shows how long the piece of work has been on our books. What I want to work out is how I work out this with working days, as at the moment if the work came in on the 1st November it would show in column e 16 days. But really it should be 10 days as it has been 10 working days, can someone help!

Thanks
Alan
 
Old November 16th, 2005, 08:37 AM
Authorized User
 
Join Date: Oct 2004
Location: , , .
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to shattered Send a message via Yahoo to shattered
Default

Function CheckWorkDate(date1 As Date, date2 As Date) As Date
Do
    date1 = date1 + 1
    If Weekday(date1) > 1 And Weekday(date1) < 7 Then iDays = iDays + 1
Loop Until date1 >= date2
CheckWorkDate = iDays
End Function

 
Old November 23rd, 2005, 03:05 AM
Authorized User
 
Join Date: Nov 2005
Location: Pondicherry, , India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,
jus do find and eliminate holidays or sundays as told by shattered it is a good idea he told..
VInod

Regards,
VInod




Similar Threads
Thread Thread Starter Forum Replies Last Post
Age Calculation rgerald SQL Server 2000 32 October 10th, 2007 01:12 AM
Getting Respondents Age from Dates Juan Patrick Visual Basic 2005 Basics 1 July 3rd, 2007 06:55 AM
age function keyvanjan ASP.NET 1.0 and 1.1 Basics 2 August 30th, 2006 08:46 AM
Calculating and filtering age based on date shawnm Classic ASP Databases 4 November 12th, 2005 06:08 AM
calculating a persons age Hudson40 Access VBA 4 January 26th, 2005 11:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.