Date in the workbook name

  • Thread starter Thread starter A & S
  • Start date Start date
A

A & S

Hi
I am trying to input the date into the title of the my workbook. I
know that you can not have a / in the title of a workbook but you can
have a - so I could put the date in as 8-2-2009 for instance. So I am
wondering is anyone knows how to get a date value from a cell that
would look like 8/2/2009 and then take that date and put it in as the
title of a workbook, but have it formatted such that it would look
like 8-2-2009.

Also is there a way to just add a day to a date, so that I could name
the next workbook 8-3-2009.

Thanks
 
In general you can format the date in a cell like this
   Format(Range("A1"), "m-d-yyyy")

or this
   Format(Range("A1") + 1, "m-d-yyyy")

Everytime that I try to use this expression it gives me the error
"Expected ="

Thanks
 
Hello,

Assume in A1 you have 8/12/2009
Then:
Concatenate(month(a1),"-",day(a1),"-",year(a1))

Gabor
 
Back
Top