I'm sure I'm going around this the wrong way by trying to paste a formula when it could be completed in the code but I'm an utter novice...
Range("W2").Select
ActiveCell.FormulaR1C1 = "=IF(AND(RC[-17]=("Small"),COUNTIF(C[-18],RC[-18])=1),"WARNING","CLEAR")"
Range("W2").Select
Dim lastrow As Long
lastrow = Range("A" & Rows.Count).End(xlUp).Row
Range("W2").AutoFill Destination:=Range("W2:W" & lastrow), Type:=xlFillDefault
Trying to get If ColF = "Small" and ColV = 1 (that in itself is a pasted and copied down formula to check to see that the number of occurrences of ColE is just once) then display WARNING in ColW
Aucun commentaire:
Enregistrer un commentaire