跪求VBA代码
将EXCEL A列中的数据,假设有64个分割成8个数组,每个数组有8个数据 要使第一个数组到第八个数组中的数据依次排列到BCDEFGHI列,将数据以数组的形式看成整体加以排列比一个一个单元格的循环处理起来要快点,希望高手能给出代码,谢谢
[解决办法]
'节前最后一天,也没什么事儿了,闲的蛋疼写这个代码
Sub split8()
Dim sh As Worksheet
stp = 8
up = 1
blow = 8
col = "B"
s = ""
Set sh = ActiveWorkbook.ActiveSheet
For i = 1 To stp
s = Replace("a" & Str(up) & ":" & "a" & Str(blow), " ", "")
arr = sh.Range(s)
s = Replace(col & "1" & ":" & col & Str(stp), " ", "")
sh.Range(s) = arr
up = up + 8
blow = blow + 8
col = Chr(Asc(col) + 1)
Next
End Sub[/size]