Excel VBA,用于从特定单元格开始选择整个列 [英] Excel VBA for selecting an entire column starting from a specific cell

查看:572
本文介绍了Excel VBA,用于从特定单元格开始选择整个列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在特定单元格之后选择整个列?

How do I select the entire column after a specific cell?

例如,我想选择C24之后的整个列,以便包括C24, C25, ...

For example, I would like to select the entire column after C24 so that includes C24, C25, ...

我使用以下代码段没有成功:

I have worked with the following snippet with no success:

ActiveSheet.Range("C24", ActiveSheet.Range("C24").End(xlDown)).Select

有人可以纠正我的错误吗?

Could someone please correct my error?

推荐答案

您只需要将两个引用包装在Range中:

You just need to wrap the two references within a Range:

Range(ActiveSheet.Range("C24"), ActiveSheet.Range("C24").End(xlDown)).Select

这篇关于Excel VBA,用于从特定单元格开始选择整个列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆