Mar 25 2022 08:47 AM
the first one I need it to check if I5 is 0 to put todays date in the cell.
the second one needs to check if J5 has a date in it, if it does write discarded (in red) if its an empty cell leave empty
Any advice? Thanks in advance
Mar 25 2022 09:19 AM
Where do you want the formulas?
Should the date change every day or should it remain fixed once it has been entered?
Mar 25 2022 10:05 AM
Mar 25 2022 01:02 PM
Right-click the sheet tab.
Select 'View Code' from the context menu,
Copy the code listed below into the worksheet module.
Switch back to Excel.
Save the workbook as a macro-enabled workbook (*.xlsm).
Make sure that you allow macros when you open it.
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("I5"), Target) Is Nothing Then
If Range("I5").Value = 0 And Range("I5").Value <> "" And Range("J5").Value = "" Then
Application.EnableEvents = False
Range("J5").Value = Date
Application.EnableEvents = True
End If
End If
End Sub