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?
In your example, something like this:
Dim tb As ListObject 'assumes Table is the first one on the ActiveSheet Set tb = ActiveSheet.ListObjects(1) MsgBox tb.DataBodyRange.Cells(2, tb.ListColumns("header4").Index)