简体   繁体   English

Excel 2013宏-ACTIVECELL.OFFSET(1、0).SELECT

[英]Excel 2013 macro - ACTIVECELL.OFFSET (1, 0).SELECT

Excel 2013宏-在ACTIVECELL.OFFSET(1,0).SELECT中如何指定电子表格中要从值偏移的行数(例如$ S $ 4 = 6)?

First to answer your question: 首先回答你的问题:

ACTIVECELL.OFFSET (ActiveSheet.Range("S4"), 0).SELECT

But you should avoid the .SELECT See THIS POST on how to do that. 但是,您应该避免使用.SELECT有关操作的信息,请参阅 .SELECT

the method you are choosing is problematic, as it will slow the code 您选择的方法有问题,因为它会减慢代码的速度

To retrieve the value in a cell and use it as the offset you can use something like: 要检索单元格中的值并将其用作偏移量,可以使用以下方法:

ACTIVECELL.OFFSET (sheet1.range("s4").value, 0).select ACTIVECELL.OFFSET(sheet1.range(“ s4”)。value,0).select

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM