S
steve1040
I have modified the following macro which I got from another posting.
2 questions
1. How do I clear all the data in UpdateListing starting at row 2?
2. In column A of UpdateListing I want the word "UPDATE" for each row.
Is it possible to add the word to V (the Array)?
I tried Array("UPDATE",3, 4, 5) but got an error
Public Sub createupdatelist()
Dim v As Variant, col As Long
v = Array(3, 4, 5) ' D, E, F
col = 2
Set rng = Range(Cells(2, 1), Cells(Rows.Count, 1).End(xlUp))
For i = LBound(v) To UBound(v)
rng.Offset(, v(i)).Copy Destination:= _
Worksheets("UpdateListing").Cells(2, col)
col = col + 1
Next
End Sub
Thanks
Steve
2 questions
1. How do I clear all the data in UpdateListing starting at row 2?
2. In column A of UpdateListing I want the word "UPDATE" for each row.
Is it possible to add the word to V (the Array)?
I tried Array("UPDATE",3, 4, 5) but got an error
Public Sub createupdatelist()
Dim v As Variant, col As Long
v = Array(3, 4, 5) ' D, E, F
col = 2
Set rng = Range(Cells(2, 1), Cells(Rows.Count, 1).End(xlUp))
For i = LBound(v) To UBound(v)
rng.Offset(, v(i)).Copy Destination:= _
Worksheets("UpdateListing").Cells(2, col)
col = col + 1
Next
End Sub
Thanks
Steve