Excel VBA - 不按顺序选择多个列 [英] Excel VBA - select multiple columns not in sequential order
本文介绍了Excel VBA - 不按顺序选择多个列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想选择多个列。
例如我想要 选择列a,b,d,e,g,h
Eg. I want to select column a, b, d, e, g, h
我试过:
Columns("A, B, D, E, G, H").select
我得到错误消息: 类型不匹配
。
I get error message: Type mismatch
.
推荐答案
范围(A: D:E,G:H)。选择
可以帮助
编辑笔记:我刚刚看到你使用了不同的列序列,更新我的答案
Edit note: I just saw you have used different column sequence, I have updated my answer
这篇关于Excel VBA - 不按顺序选择多个列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文