Skip to content

Instantly share code, notes, and snippets.

@ateneva
Last active April 16, 2017 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ateneva/198319a41d9d3af7580011ae37ab8354 to your computer and use it in GitHub Desktop.
Save ateneva/198319a41d9d3af7580011ae37ab8354 to your computer and use it in GitHub Desktop.
Fill empty cells with a constant
Sub FillInEmptyCellWithConstant()
Dim i As Long
Dim Col As Integer
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'written by Angelina Teneva, September 2016
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For Col = 7 To 68
For i = 1 To Cells(Rows.Count, Col).End(xlUp).row
If IsEmpty(Cells(i, Col)) Then Cells(i, Col).Value = "empty"
Next i
Next Col
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment