crazybuckeyeguy
New Member
- Joined
- Apr 15, 2017
- Messages
- 49
Trying to write VBA that looks for blank cell in column A. if blank copy the cell directly and to column G above it and paste in the blank cells. Im a little stuck. here is what I have.
Sub Copyname()
Application.ScreenUpdating = False
For MY_ROWS = 1 To Range("A" & Rows.Count).End(xlUp).Row
If Range("A" & MY_ROWS).Value = "" Then
Range("A:G" & MY_ROWS).Value = Range("A:G" & MY_ROWS - 1).Value
End If
Next MY_ROWS
Application.ScreenUpdating = True
End Sub
Sub Copyname()
Application.ScreenUpdating = False
For MY_ROWS = 1 To Range("A" & Rows.Count).End(xlUp).Row
If Range("A" & MY_ROWS).Value = "" Then
Range("A:G" & MY_ROWS).Value = Range("A:G" & MY_ROWS - 1).Value
End If
Next MY_ROWS
Application.ScreenUpdating = True
End Sub