Excel Macro Weekday / Today Function

Q

QTE

Would like to increment a formatted General cell by 1 each time the da
is either Tuesday or Friday, from one year to the next. Would like thi
to be automated so that it is updated regardless of whether I actuall
open the file. So, if I have not opened the file for 2 weeks the cel
will be updated by the required days during those 2 weeks.

Thanks
QT
 
J

JE McGimpsey

One way:

Assuming you're starting as of last Sunday (30 May 2004):

=2*INT((TODAY()-DATE(2004,5,30))/7) + (WEEKDAY(TODAY())>=3) +
(WEEKDAY(TODAY())>=6)
 
J

jeff

Hi, QTE,

Sorry, but nothing will happen to the file if it's not
opened. However you can write some code (either via
a formula, perhaps, or VBA) which will update the
values upon opening the file.

jeff
 
B

Bill Kuunders

Other way:

=(today()-38140)/3.5
formatted as number without decimals will give you 1 today ,Friday, and 2 on
Tuesday
decrease the number 38140 by 3.5 to get a higher starting number.

i.e.
=(today()-38136.5)/3.5 will give you 2 today and 3 on tuesday.

Bill K
 
Q

QTE

Thanks Bill

QTE


Bill said:
*Other way:

=(today()-38140)/3.5
formatted as number without decimals will give you 1 today ,Friday
and 2 on
Tuesday
decrease the number 38140 by 3.5 to get a higher starting number.

i.e.
=(today()-38136.5)/3.5 will give you 2 today and 3 on tuesday.

Bill K


weeks.
[/QUOTE]
 
Top