Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hey guys,
Have searched the forum and cant find the answer to this one! I am trying to enter in a date in a cell using a macro; the date needs to be 3 working days before todays date. I thought i could utilise the NETWORKDAYS function, but cant seem to do it. Thanks in advance Dan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Disco;
Use this; ActiveCell = Date - 3 Thanks, Greg -----Original Message----- Hey guys, Have searched the forum and cant find the answer to this one! I am trying to enter in a date in a cell using a macro; the date needs to be 3 working days before todays date. I thought i could utilise the NETWORKDAYS function, but cant seem to do it. Thanks in advance Dan . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=WORKDAY(TODAY(),-3)
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "disco" wrote in message ... Hey guys, Have searched the forum and cant find the answer to this one! I am trying to enter in a date in a cell using a macro; the date needs to be 3 working days before todays date. I thought i could utilise the NETWORKDAYS function, but cant seem to do it. Thanks in advance Dan |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
try this: Sub maccount3() Dim c As Variant Dim ctr As Integer c = Date ctr = 3 Do While ctr = 1 If Weekday(c) = 1 Then c = c - 2 Else ctr = ctr - 1 c = c - 1 End If Loop MsgBox "3 Days from now(not counting weekends) is " & c c.Value = Range("mycell").Value End Sub -----Original Message----- Hey guys, Have searched the forum and cant find the answer to this one! I am trying to enter in a date in a cell using a macro; the date needs to be 3 working days before todays date. I thought i could utilise the NETWORKDAYS function, but cant seem to do it. Thanks in advance Dan . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autofill date on date entry in a separate column | Excel Worksheet Functions | |||
Excel 2002 date entry: Cannot get away from d-m-yy entry format | Excel Discussion (Misc queries) | |||
Restricting date entry relative to current date | Excel Worksheet Functions | |||
last entry of a particular date | Excel Discussion (Misc queries) | |||
Date entry | Excel Discussion (Misc queries) |