Refer to Excel cell in Table by header name and row number

后端 未结 7 1479
孤独总比滥情好
孤独总比滥情好 2020-12-23 14:58

I\'m trying to refer to a cell in an excel table by using the table header name and the row number using VBA.

How can I do this?

相关标签:
7条回答
  • 2020-12-23 15:24

    A shorter answer is:

    MsgBox [MyTable].Cells(2, [MyTable[MyColumn]].Column)
    

    Much cleaner and easier!

    0 讨论(0)
提交回复
热议问题