Created
November 27, 2014 01:53
-
-
Save henryscala/7ed0cd0a33439bf8c68a to your computer and use it in GitHub Desktop.
vba functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub squeezeRow(column, startRow, endRow As Integer) | |
Dim count As Integer | |
count = 0 | |
i = startRow | |
Do While i <= endRow | |
If Cells(i, column).Value = "" Then | |
For j = i + 1 To endRow | |
Cells(j - 1, column).Value = Cells(j, column).Value | |
Next | |
Cells(endRow, column) = "" | |
endRow = endRow - 1 | |
Else | |
i = i + 1 | |
End If | |
Loop | |
End Sub | |
Sub run() | |
Call squeezeRow(7, 21, 26) | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment