joeyexcelrookie
New Member
- Joined
- Jan 27, 2014
- Messages
- 1
Hi everyone,
I've got a range of data in sheet1 that I want to sort through and transfer to single column in sheet2. This should hopefully be quite a simple task.
The data is in sheet1 in the range E12:M100. I want to some code that goes through each row (like reading a book) and transfers all the non-zero items into a new column in sheet2. Hopefully this process can be done with a trigger key that automatically creates the new sheet and places the column in a specified spot (say starting at C3).
This was my code so far but it could be rubbish:
Sub Looper()
Dim rng As Range
Dim row As Range
Dim cell As Range
Dim colsheet2 As Range
Set rng = Worksheets("sheet1").Range("E12:AH16")
Set colsheet2 = Worksheets("sheet2").Range("F2:F500")
For Each row In rng.Rows
For Each cell In row.Cells
'do something
Next cell
Next row
End Sub
Please let me know if anyone can help!
I've got a range of data in sheet1 that I want to sort through and transfer to single column in sheet2. This should hopefully be quite a simple task.
The data is in sheet1 in the range E12:M100. I want to some code that goes through each row (like reading a book) and transfers all the non-zero items into a new column in sheet2. Hopefully this process can be done with a trigger key that automatically creates the new sheet and places the column in a specified spot (say starting at C3).
This was my code so far but it could be rubbish:
Sub Looper()
Dim rng As Range
Dim row As Range
Dim cell As Range
Dim colsheet2 As Range
Set rng = Worksheets("sheet1").Range("E12:AH16")
Set colsheet2 = Worksheets("sheet2").Range("F2:F500")
For Each row In rng.Rows
For Each cell In row.Cells
'do something
Next cell
Next row
End Sub
Please let me know if anyone can help!