Looking for code help to loop through A1:A10, and if A is Not Empty, the value of A will be moved over 1 column, to B.
Existing Data In B cannot be disturbed. The Data in Column A is being generated by a Formula.
I have the following code for the 1st 3 cells, but just don't have the knowledge to create a loop for the whole range of cells (Which will ultimately be AE8:AE157 values moved to AF8:AF157, respectively).
Been searching for hours with no luck. Thanks for any help.
From:
To This:
Existing Data In B cannot be disturbed. The Data in Column A is being generated by a Formula.
I have the following code for the 1st 3 cells, but just don't have the knowledge to create a loop for the whole range of cells (Which will ultimately be AE8:AE157 values moved to AF8:AF157, respectively).
Been searching for hours with no luck. Thanks for any help.
VBA Code:
Private Sub DataTransfer()
If Not IsEmpty(Range("a1").Value) Then
Range("B1").Value = Range("A1").Value
Range("A1").Clear
End If
If Not IsEmpty(Range("a2").Value) Then
Range("B2").Value = Range("A2").Value
Range("A2").Clear
End If
If Not IsEmpty(Range("a3").Value) Then
Range("B3").Value = Range("A3").Value
Range("A3").Clear
End If
End Sub
From:
To This: