If Range("L9") > (Range("I9") + Range("J9")) Then
Range("B8:O8").Interior.Color = RGB(255, 0, 0)
Here I want to copy the validation rules if this happens
End If
If Range("L9") > (Range("I9") + Range("J9")) Then
Range("B8:O8").Interior.Color = RGB(255, 0, 0)
Here I want to copy the validation rules if this happens
End If
Hello, If I understood correctly, you want to copy the data validation, however the data validation can not be copied, but you can add an equal like this:
Range("B4").Validation.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="0", Formula2:="10"
This example only leaves numbers from 1 to 10 in the cell, you can use variables to copy the validation.
I hope I have helped.