Bạn thử.Anh chi cho em hoi, sao tat cac cac o deu = 1 @@Mã:Sub test() Dim arr(1 to 10) as integer Dim i as integer For i = 1 to 10 step 1 arr(i) =i Next i Thisworkbook.sheets(1).Range(Cells(1,1),cells(10,1)).value = arr End sub
Sub test()
Dim arr(1 To 10) As Integer
Dim i As Integer
For i = 1 To 10 Step 1
arr(i) = i
Next i
ThisWorkbook.Sheets(1).Range(Cells(1, 1), Cells(10, 1)).Value = Application.Transpose(arr)
ThisWorkbook.Sheets(1).Range(Cells(1, 1), Cells(1, 10)).Value = arr
End Sub