Busymanjohn
New Member
- Joined
- Oct 17, 2011
- Messages
- 11
Hi, I have a piece of code, which was given to me by another person ( I am useless at VBA right now ) .... the code needs adjusting to suit what I need it to do ..... I have a spreadsheet with multiple tabs each containing data, I want to be able to import the data from each worksheet into a front tab ( called Summary ) but I only want to pull the data from those other worksheets if column A has data in it ( column A in each tab contains an IF statement running off of col I ), there will be rows within column A that are blank, I want to ignore those and have the Summary tab populate. here is the code I have just now ....
Sub MoveData()
i = 1
With Worksheets("Summary")
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> .Name Then
MyValue = ws.Range("A1")
.Cells(i, "A") = MyValue
i = i + 1
End If
Next
End With
End Sub
Any ideas?
Sub MoveData()
i = 1
With Worksheets("Summary")
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> .Name Then
MyValue = ws.Range("A1")
.Cells(i, "A") = MyValue
i = i + 1
End If
Next
End With
End Sub
Any ideas?