Sub aaa() If Range("g17") = "" Then Range("g17") = Range("g11") ElseIf Range("h17") = "" Then Range("h17") = Range("g11") ElseIf Range("i17") = "" Then Range("i17") = Range("g11") Else Range("g17:i17") = "" 'Range("g17") = Range("g11") End If End Sub