I have the following:
Private Sub Worksheet_Activate()
If [E2] <> [G1] Then Range("H9:H44").Value = "Pendente"
End Sub
I need to include in the initial check whether the cells to be changed have a specific value.
I tried the following:
Private Sub Worksheet_Activate()
If [E2] <> [G1] And Range("H9:H44").Value = "Paga" Then Range("H9:H44").Value = "Pendente"
End Sub
That is, I need it to change only the cells that have the value "Paga" in that column.
What is the correct way to do this?