I need a cell to show the date only when that day comes. what is the formula ?

Anonymous
2024-11-22T05:24:04+00:00

i need a cell to show the date when that day arrives. And the date will display permanently. Can anyone help me with this formulas.

Much thanks

Ong

Microsoft 365 and Office | Excel | For education | Android

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-11-22T06:26:34+00:00

    Could you share a screenshot of your data?

    From your description, you may use workbook open event to check if that date is arrives, then input date in to that cell.

    This macro checks if today's date matches November 22, 2024. If it does, it sets the value of cell A2 on the sheet1 to today's date.

    If you have alredy a target date in one cell, change DateSerial(2024, 11, 22) to Sheets(1).Range("A3").Value

    Private Sub Workbook_Open()
        Dim targetDate As Date
        targetDate = DateSerial(2024, 11, 22)
        
        If Date = targetDate Then
            Sheets("Sheet1").Range("A2").Value = Date
        End If
    End Sub
    
    0 comments No comments