By: Shamima Sultana

In reply to Imtiaz.

Hello Imtiaz,

To do so you need to use two VBA code in your Excel workbook. One in the Module to update date and another in the first sheet where you will update the date. Make sure to replace “Sheet1” with the actual name of the sheet where you will enter the date, and “A1” with the cell reference where the date is located.
Copy and paste the following VBA code into the new module:

Sub UpdateDateInAllSheets()
Dim ws As Worksheet
Dim dateValue As Variant

' Change "Sheet1" to the name of the sheet where you will enter the date
dateValue = ThisWorkbook.Sheets("Sheet1").Range("A1").Value

For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "Sheet1" Then
ws.Range("A1").Value = dateValue
End If
Next ws
End Sub

To automatically update the date whenever the date is changed, you need to use the Worksheet_Change event.
In the VBA Editor, double-click the sheet where you will enter the date (e.g., Sheet1) in the Project Explorer window.
Then, paste the following code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
Call UpdateDateInAllSheets
End If
End Sub

Again, replace “$A$1” with the actual cell reference where the date is located.

Now, whenever you change the date in the specified cell on your primary sheet (e.g., Sheet1), the date will automatically be updated in the corresponding cell on all other sheets.
VBA code will assume that the date is located in the same cell on each sheet.

Regards
ExcelDemy