Discussion Locked

How to change a cell "Date" in Excel?

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a Excel spreadsheet to do a daily cash receipt report. Each month there is a different "reporting period", i.e. Jan 2002, Feb 2002. Currently I manually change this cell at the beginning of each month to reflect the current month. How would Iformat this cell to automatically change to the current month?
Thank You

2 replies

by razzadaz

Try:
Insert>Function>Date&Time>Date(or function name of your preference, such as month -date and year.

by shanghai sam

=NOW() with the cell formatted as MMMM, YYYY supplies the present month, but it's volatile; it will change as the date changes. You would have to Copy and Paste Special Values to make it permanent.

You could write a simple macro that you would run each month:

Sub TheMonth
Dim MyDate
MyDate = Date
Selection = MyDate
Selection.NumberFormat = ?MMMM, YYYY?
End Sub

If you name the sheets with the date at the beginning of the year, you can put the sheet name in the cell with:
=MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,
LEN(CELL("filename",A1))-FIND("]",CELL("filename",A1)))

This discussion is closed to new replies.