[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

Switching from Jan-1 yields 1/1/2006, should be 2007

Jason Lepack

12/19/2006 2:48:00 PM

I have a macro that merges multiple spreadsheets for input into a
forecast. The dates in the initial spreadsheet are in the format
"DEC-12". The forecast requires the dates in the format "12/12/2006".


I fixed that but the problem is this. Right now there are dates on for
January but my macro creates the dates as 1/1/2006 when it should be
1/1/2007.

Any thoughts on a formatting method apart from a brute force
programming solution checking to see if the data covers two years
(which I'm already working on)?

1 Answer

Jon Peltier

12/19/2006 3:02:00 PM

0

When the year isn't specified, Excel assumes the current year. So you need
to tell Excel you want January of next year, or you have to program
something.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://Pelti...
_______


"Jason Lepack" <jlepack@gmail.com> wrote in message
news:1166539662.487282.5250@80g2000cwy.googlegroups.com...
>I have a macro that merges multiple spreadsheets for input into a
> forecast. The dates in the initial spreadsheet are in the format
> "DEC-12". The forecast requires the dates in the format "12/12/2006".
>
>
> I fixed that but the problem is this. Right now there are dates on for
> January but my macro creates the dates as 1/1/2006 when it should be
> 1/1/2007.
>
> Any thoughts on a formatting method apart from a brute force
> programming solution checking to see if the data covers two years
> (which I'm already working on)?
>