Hi guys hope you're all well!
This is my first attempt at scripting something in VBA and Im trying to do a formula with multiple if statement
Im basically trying to script something so that when 4 criteria are met it deletes 2 cells. Heres my code
Sub test()
If Range("P9") = Range("H9") And Range("P11") = Range("G9") And Range("T9") = "YES" And Range("T11") = "YES" Then
Range("O9").ClearContents And Range("010").ClearContents
End If
End Sub
Can anyone help. Many thanks
This is my first attempt at scripting something in VBA and Im trying to do a formula with multiple if statement
Im basically trying to script something so that when 4 criteria are met it deletes 2 cells. Heres my code
Sub test()
If Range("P9") = Range("H9") And Range("P11") = Range("G9") And Range("T9") = "YES" And Range("T11") = "YES" Then
Range("O9").ClearContents And Range("010").ClearContents
End If
End Sub
Can anyone help. Many thanks