Code: Select all
Sub CopyColumn()
Dim wb1 As Workbook
Dim wb2 As Workbook
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Set wb1 = Workbooks.Open("C:\Users\**I've been banned**\Desktop\1.xls")
Set wb2 = Workbooks.Open("C:\Users\**I've been banned**\Desktop\Alert..csv")
Set ws1 = wb1.Worksheets.Item(1)
Set ws2 = wb2.Worksheets.Item(1)
With ws1
.Range(.Cells(1, 9), .Cells(.Rows.Count, 9).End(xlUp)).Copy .Cells(1, 2)'(i have issue with this line wb1 has 1st row as headers so ignore the first row and copy from row I2 and paste it to wb2 in column 2 from 1st row B1 )
End With
Wb2.Save
Let Application.DisplayAlerts = False
Wb2.Close
Let Application.DisplayAlerts = True
Wb1.Close
End Sub
plz convert ALERT.xlsx to csv
https://www.ozgrid.com/forum/index.php? ... ost1234453" onclick="window.open(this.href);return false;