EXCEL VBA按条件的内容组合
答案:2 悬赏:0 手机版
解决时间 2021-02-22 04:40
- 提问者网友:做自己de王妃
- 2021-02-22 01:35
按条件的内容组合
最佳答案
- 五星知识达人网友:归鹤鸣
- 2021-02-22 01:55
12345678910111213141516171819Sub s() a = [b6] b = [b8] n = Len(a) ReDim arr(1 To n) For i = 1 To n arr(i) = Mid(a, i, 1) & Mid(b, i, 1) Next For i = 1 To n - 1 For j = n - 1 To i Step -1 If arr(j) > arr(j + 1) Then t = arr(j) arr(j) = arr(j + 1) arr(j + 1) = t End If Next Next [b10].Resize(n) = Application.Transpose(arr)End Sub
全部回答
- 1楼网友:平生事
- 2021-02-22 03:10
sub s()
a = [b6]
b = [b8]
n = len(a)
redim arr(1 to n)
for i = 1 to n
arr(i) = mid(a, i, 1) & mid(b, i, 1)
next
for i = 1 to n - 1
for j = n - 1 to i step -1
if arr(j) > arr(j + 1) then
t = arr(j)
arr(j) = arr(j + 1)
arr(j + 1) = t
end if
next
next
[b10].resize(n) = application.transpose(arr)
end sub
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯