Hi, so use this:
x = DatePart("yyyy", Date)
Henrich
€žReD-DevIL" napĂ*sal (napĂ*sala):
Hi, thanks a lot for your help. But instead of giving "x" a fixed value,
can we have a condition that once every first day of a new year it will
automatically create a new worksheet. e.g. today is 01/01/06 then a new
worksheet named 2007 is created, then once it is 01/01/07 a worksheet
for 2008 will be added. Is that possible ?
--
ReD-DevIL
------------------------------------------------------------------------
ReD-DevIL's Profile: http://www.excelforum.com/member.php...o&userid=32624
View this thread: http://www.excelforum.com/showthread...hreadid=525600