View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default Auto update/fill column heading

is there some formula for the week number?

SUB Amend()
Range("C1").Value = Range("D1").Value
Range("C2").Delete xlToLeft
END SUB







"choo" wrote:

I would like to have a script that enters the dates on 1st row and work weeks
on second row as column headings.

Cell C1 has "8/31/09" (no fomula) and D1 has a formula "=C1+7", and E1
formula's "=D1+7".
Cell C2 has "WK35", D2 has "WK36", E2 has "WK37". They are text, no formula
here.

So if I run the script, value of D1 will be entered in cell C1, and D1:E1
will automatically be updated with value "9/14/09" and "9/28/09" because the
value in C1 changes.
And value in C2 will become "WK36", D2 becomes "WK37" and so on.

Thanks.