Nếu làm VBA thì làm như thế này:
Sub ChuyenDinhDang()
Dim KQarr()
Dim SoCot As Integer
'Thong so dau vao
Set IRange = Application.InputBox("Nhap vung du lieu muon chuyen doi", Type:=8)
SoCot = Application.InputBox("Nhap so cot muon chuyen doi", Type:=1)
Set CellPaste = Application.InputBox("Nhap vi tri bat dau chuyen du lieu", Type:=8)
ReDim KQarr(1 To 1000, 1 To SoCot)
'Tinh toan KQarr
i = 1
j = 0
For Each cll In IRange.Value
j = j + 1
If j = SoCot + 1 Then
j = 1
i = i + 1
End If
KQarr(i, j) = cll
Next
'Dan ket qua
CellPaste.Resize(i, SoCot) = KQarr
End Sub