Hi, I have the code which able to fill the blank cells by copying the content from the top, basically the vba codes is running for all columns in worksheet, but I would like to exclude certain columns, what should I do with the following codes, for example to exclude column M, N, O.
VBA Code:
'copy data if cell are blank for number value from top to bottom
Application.ScreenUpdating = False
With Sheets("GFL")
For RowIndex = 1 To LastRowIndex
For iCntr = 1 To UsedRng.Columns.Count
If Not IsEmpty(Cells(RowIndex, iCntr).Value) Then
If IsNumeric(Cells(RowIndex, iCntr).Value) = False Then
If IsEmpty(Cells(RowIndex + 1, iCntr).Value) Then
Cells(RowIndex + 1, iCntr).Value = Cells(RowIndex, iCntr).Value
End If
End If
End If
Next iCntr
Next RowIndex
End With