Dear Friends,
I am trying to write a code to copy cell value in a range if not equal to blank and paste below16 rows from active cell,after pasting one value it should go to next value in the range and do the same.
below code is doing the first task and not going next value. sample file is attached here with. can you guide me where I am wrong.
I am trying to write a code to copy cell value in a range if not equal to blank and paste below16 rows from active cell,after pasting one value it should go to next value in the range and do the same.
below code is doing the first task and not going next value. sample file is attached here with. can you guide me where I am wrong.
Code:
Sub PROCESS()
Dim rng As Range, cell As Range
Set rng = Range(Cells(4, 5), Cells(1000, 5))
For Each cell In rng
If cell.Value <> "" Then
cell.Select
cell.Copy
Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(16, 0)).Select
ActiveSheet.Paste
End If
Next cell
End Sub