有没有办法对单元格地址进行分类?
有没有办法从左上角到右下方对单元格进行分类?
例如,
DIM targetAddress作为字符串
targetAddress =“ $ e $ 12,$ b $ 11:$ c $ 12,$ g $ 14,$ f $ 2,$ f9”'我想从左上到底部的随机选择的单元格,
所示:
如下 $ f $ 2,$ f $ 9,$ b $ 11:$ c $ 12,$ e $ 12,$ g $ 14”
Is there a way to sort cell addresses from top left to bottom right?
e.g.
Dim targetAddress As String
targetAddress = "$E$12,$B$11:$C$12,$G$14,$F$2,$F9" 'randomly selected cells
I want to sort targetAddress from top left to bottom right as follows:
"$F$2,$F$9,$B$11:$C$12,$E$12,$G$14"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对工会的细胞地址进行排序,
我的第一个想法是工会是由Excel自动排序的,但事实证明我是错误的。在这里,使用用户“ Jorge-Ferreira”的QuickSort提案。
重读问题后,我发现以下是
解决方案不是被搜索的答案。 ; - (
在此窗口的输出:
Sorting the cell addresses of a union
My first thought was that a union is automatically sorted by Excel, but I was proven wrong. Here a proposal using Quicksort from user "jorge-ferreira".
After rereading the question I found that the below
solution is NOT the answer which was searched for. ;-(
Here the output of the Immediate Window:
与与
上升的排和降列
最终要答案! ;-)
在这里,即时窗口的输出:
Sorting the cell addresses of a union with
ascending row and descending column
Finally the answer which was asked for! ;-)
Here the output of the Immediate Window:
与与
升级和下降列
使用内置的Excel直接向前
:在此处的输出:
为什么$ e $ $ $ $ $ 12 $ b $ 11:$ c $ 12?
在即时窗口的输出中,我们看到,通过向工会添加地址$ 11 $ C $ 11:$ b $ 11:$ c $ 12的$ 12更改为工会结束! ;-(
Sorting the cell addresses of a union with
ascending row and descending column
Straight forward approach using the inbuilt sort of Excel:
Here the output of the Immediate Window:
Why is $E$12 in front of $B$11:$C$12?
In the output of the Immediate Window we see that by adding address $C$11 to the union the range $B$11:$C$12 changes to the end of the union! ;-(