[英]Simplifying code into one line in excel vba?
Here is my code: 这是我的代码:
Sub part1()
Range("A1", Range("A1").End(xlDown)).Select
Selection.NumberFormat = "0"
End Sub
I want to simplify it into 1 line so that it formats column A as integers. 我想将其简化为1行,以便将A列格式化为整数。 I know it's a very simple question but please help me.
我知道这是一个非常简单的问题,但请帮助我。
Sub part1()
Range("A1", Range("A1").End(xlDown)).NumberFormat = "0"
End Sub
Selection is not needed. 不需要选择 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.