The majority of the time this sub works fine to paste the column heading to any cells that read "Blank". However, every now and then it errors
and reads "type mismatch". It highlights
If cells (x,y) = "blank" Then
Any ideas why?

Public Sub Paste_Blank()

Dim x As Integer
    Dim y As Integer
    For y = 1 To 1000
        For x = 2 To 1000
            If Cells(x, y) = "blank" Then
                Cells(x, y).Value = Cells(1, y)
            End If
        Next x
    Next y


End Sub