Hello, will start off by saying I am extremely new to VBA so I appreciate the patience beforehand.
1) I am currently attempting to search "Column A" to find the first blank cell row (highlighted red) in "Column A" which then has data in the next 5 columns (highlighted light red).
2) I am then attempting to take the data in "Columns B:F" and paste/offset into the destination marked with the purple borders.
This below screenshot shows an example of what I am working with on a smaller scale as my original file is thousands rows long.
My current code enables me to find the blank cells in "Column A" (highlighted blue) but I am at a loss to begin figuring out how to copy the data adjacent to it.
Thanks!
1) I am currently attempting to search "Column A" to find the first blank cell row (highlighted red) in "Column A" which then has data in the next 5 columns (highlighted light red).
2) I am then attempting to take the data in "Columns B:F" and paste/offset into the destination marked with the purple borders.
This below screenshot shows an example of what I am working with on a smaller scale as my original file is thousands rows long.
My current code enables me to find the blank cells in "Column A" (highlighted blue) but I am at a loss to begin figuring out how to copy the data adjacent to it.
VBA Code:
Sub test2()
Dim sourceCol As Integer, rowCount As Integer, currentRow As Integer
Dim currentRowValue As String
sourceCol = 1
rowCount = cells(Rows.Count, sourceCol).End(xlUp).Row
For currentRow = 1 To rowCount
currentRowValue = cells(currentRow, sourceCol).Value
If IsEmpty(currentRowValue) Or currentRowValue = "" Then
cells(currentRow, sourceCol).Interior.ColorIndex = "17"
End If
Next
End Sub
Thanks!