简体   繁体   中英

Select a table column referenced by a cell parameter

I have in my excel table A1 cell - giving the name of the column table that I want to select. eg: A1 = Apr - Table2[Apr]

I want a code that takes the value from Cell A1 and selects accordingly the table column. Something like as follows

Instead of:

Sub selection()

Range("Table2[Apr]").Select

End Sub

I would like to have something based on the following logic:

Sub selection()

Range("Table2[Cells(1,1).Select]").Select

End Sub

How should this be built in VBA?

尝试这个

range(range("A1")).select

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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