简体   繁体   English

如何将excel中的结构化引用转换为范围?

[英]How do you convert a structured reference in excel to a range?

I have a table with columns that have headers. 我有一个包含标题的列表。 I'd like to be able to convert the structured reference [Column 2] to the range B1:B1000 and Table1[[#Data],[Column2]] to the range B2:B1000 . 我希望能够将结构化参考[Column 2]转换为范围B1:B1000Table1[[#Data],[Column2]]到范围B2:B1000

edit for context: 编辑上下文:

This is in the formula editor so the structured references refer to a table in the current worksheet. 这是在公式编辑器中,因此结构化引用引用当前工作表中的表。

This will give you the address: 这将给你地址:

Activesheet.Range("Table1[[#Data],[Column2]]").Address()

This would give you a reference to the range itself 这将为您提供范围本身的参考

Dim rng As Range
Set rng = Activesheet.Range("Table1[[#Data],[Column2]]")

In the Table options you can select the option Convert to Range which will change structured references in formulas to range references, you can then choose Insert Table to reinstate the table. 在“表”选项中,您可以选择“ 转换为范围 ”选项该选项公式中的结构化引用更改为范围引用,然后可以选择“插入表”以恢复表。 To simplify formulas you could use find & replace eg Sheet1! 要简化公式,您可以使用查找和替换,例如Sheet1! and $ with blank. $空白。

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

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