gpt4 book ai didi

excel - 搜索一系列单元格中的所有单词对

转载 作者:行者123 更新时间:2023-12-04 21:51:21 24 4
gpt4 key购买 nike

任何人都可以帮助一些 VBA 代码,该代码将查看一系列单元格并拉出并列出所有由空格分隔的单词对。

所以这

enter image description here

会像这样输出

enter image description here

最佳答案

Sub F()

Dim x, z, arr, cell

For Each cell In [A1:A3]
arr = Split(cell)
For x = 0 To UBound(arr) - 1
z = z + 1
Cells(z, 2) = arr(x) & " " & arr(x + 1)
Next
Next

End Sub

关于excel - 搜索一系列单元格中的所有单词对,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53613735/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com