I'm trying to create a macro that declares a range of cells and copies and pastes each cell 1 at a time in to cell "A2". This should only happen if the cell in column have data present.
The error I'm getting is a Run-Time error '1004' Application-defined or object-defined error.
I'm more from a C# background so I'm hoping its just a syntax error but this is what I have so far.
Any help will be greatly appreciated.
Sub Update1()
'
' Update1 Macro
' Update
'
Dim PartListRange As Range
Dim PartListCell As Range
Set PartListRange = Sheets("Query").Range("C2:100")
For Each PartListCell In PartListRange.Cells
If Cell.Value <> "" Then
Worksheets("Query").Range(PartListCell).Copy _
Destination:=Worksheets("Query").Range("A2")
ActiveWorkbook.RefreshAll
End If
Next PartListCell
End Sub
Set PartListRange = Sheets("Query").Range("C2:100")1isC2:C100