Hello,
I'm brand new to this forum so the usual apologies if this is not appropriate place or specific subject.
I'm working on a project in excel that essentially loops through worksheets, which each have a simple list of items, and copies those items all onto a master list.
I'm new to VBA scripting and I cannot determine the best path to use. I am trying now to use a nested for each loop to go through the individual worksheets, and within that a do while loop to copy the data from the lists to paste onto the master list (a separate worksheet).
Here is my macro as it stands now (not at all complete), would someone be able to point me in the right direction?
I realize this is probably low-level stuff to you all, but any help would be appreciated.
I'm brand new to this forum so the usual apologies if this is not appropriate place or specific subject.
I'm working on a project in excel that essentially loops through worksheets, which each have a simple list of items, and copies those items all onto a master list.
I'm new to VBA scripting and I cannot determine the best path to use. I am trying now to use a nested for each loop to go through the individual worksheets, and within that a do while loop to copy the data from the lists to paste onto the master list (a separate worksheet).
Here is my macro as it stands now (not at all complete), would someone be able to point me in the right direction?
Code:
Sub Macro1()
Dim ws As Worksheet
Dim i As Integer
For Each ws In ActiveWorkbook.Worksheets
i = 12 '**i=12 as the list on every worksheet starts at D12**'
Do While (currentWorksheet.Cells(i, 4) <> "")
Range("D12").Select
Selection.Copy
Sheets("Transaction List").Select '**Transaction List = Master List**'
Range("F6").Select '**F6 is the first line of the master list**'
ActiveSheet.Paste '**How can I stop the macro from just pasting over itself instead of properly creating a list?**'
i = i + 1 '**I'm concerned because how will I be able to reset the counter on a new ws?**'
Loop
On Error Resume Next
Next ws
End Sub