LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Changing the Year in formatted Date

I would like to change to year portion from 2009 to 2010 in multiple cells.
The cells are formatted as Date with *3/14/2001 selected

for k = 1 to 5
Sheets("Sheet1").Cells(k,2)=Date
if Date.year = 2009 then Date.year=2010
next k

Date.year is incorrect. How do I change and save the date?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
column formatted to general - cells keep changing to date? lilsparkdog New Users to Excel 1 September 11th 08 05:48 PM
changing date formatted as general number into date format pghio Excel Programming 4 March 2nd 07 05:17 PM
changing the year of a date zapszipszops Excel Worksheet Functions 2 April 14th 06 04:57 AM
how do i add 1 year to a date formatted cell? rogerm Excel Worksheet Functions 5 September 4th 05 06:46 AM
Changing the year only in a date cs_vision Excel Programming 1 June 8th 05 05:19 PM


All times are GMT +1. The time now is 04:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"