MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Using Day from =now() statement

Posted by Dee on August 24, 2001 5:08 AM

Is there any way to use the day from the =now() formula

I have typed the formula A1 = now() and formatted the cell to read Ddd, the result for today being Friday.

I want to be able to use this as the name for my workbook, but when i try to use it excel disallows me because the value is actually 08/24/2001 08:45:00 in the status bar.

Can the day be extracted and used so I can name my workbook the same as the day I am working on it?



Posted by Robb on August 24, 2001 5:34 AM


I presume you are trying to do this in VBA. If so, try something like this:

Sub SvFile()
Dim myDate As String
myDate = Format(Now, "dddd")
ActiveWorkbook.SaveAs "E:\" & myDate & ".xls"
End Sub

Any help?


Posted by Dee on August 24, 2001 6:11 AM

Thank you, just what I need,
Have a good weekend