Sub tfff()
ActiveSheet.UsedRange.Interior.ColorIndex = xlNone
Rng = Range("a1")
Range(Rng).Interior.ColorIndex = 2
Range(Rng).Borders.LineStyle = xlContinuous
i = 1
For Each r In Range(Rng)
If r.Value = "" Then
r.Value = i
i = i 1
End If
Next
End Sub