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

Ole Henrik Skogstrøm

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?

enter image description here

brettdj

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)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How To Reference an Excel Table Cell by Row Number or Horizontal Header Using Table Notation?

From Dev

Row header and column header for a particular cell in table

From Dev

Lookup Column (Header) name in Excel for a given cell

From Dev

dynamically refer to table name in Excel VLOOKUP formula

From Dev

Get the row number of a named Excel cell in MATLAB

From Dev

Return Table Row number on Cell Change VBA

From Dev

Reference a cell of the previous row in the same table in Excel?

From Dev

Excel: Lookup matching cell in a table and return the value of the first cell in the row

From Dev

Table row cell values update by using row number

From Dev

Excel VBA Find column name of first blank cell in row

From Dev

Find out Excel column character from name of cell in first row

From Dev

Excel select a value from a cell having row number calculated

From Dev

How to use the row number of a named cell in Excel VBA

From Dev

Excel select a value from a cell having row number calculated

From Dev

Range row number reference from another cell in Excel

From Dev

How to name all data except for header row in Excel

From Dev

excel vba: find the row of a cell with a certain value and put that row number in another cell

From Dev

Get a certain value based on table header and row name

From Dev

Excel VBA: How to paste a value in the first Cell of the last row of a table?

From Dev

How to get the Excel header on each print page to be the first row of the table

From Dev

Knitr xtable row color result in 2nd table in the row header cell blacked out

From Dev

Using CSS in order to highlight a given table header and first table row on hover of a cell

From Dev

How to place values inside table cell according to combination of table header and first row value?

From Dev

Get column header and row header on cell click

From Dev

Append row and cell to table

From Dev

Excel Find Cell Name

From Dev

Hide table header if there is no row

From Dev

Using the contents of a cell to refer to a worksheet name in a formula

From Dev

space between header and table cell

Related Related

  1. 1

    How To Reference an Excel Table Cell by Row Number or Horizontal Header Using Table Notation?

  2. 2

    Row header and column header for a particular cell in table

  3. 3

    Lookup Column (Header) name in Excel for a given cell

  4. 4

    dynamically refer to table name in Excel VLOOKUP formula

  5. 5

    Get the row number of a named Excel cell in MATLAB

  6. 6

    Return Table Row number on Cell Change VBA

  7. 7

    Reference a cell of the previous row in the same table in Excel?

  8. 8

    Excel: Lookup matching cell in a table and return the value of the first cell in the row

  9. 9

    Table row cell values update by using row number

  10. 10

    Excel VBA Find column name of first blank cell in row

  11. 11

    Find out Excel column character from name of cell in first row

  12. 12

    Excel select a value from a cell having row number calculated

  13. 13

    How to use the row number of a named cell in Excel VBA

  14. 14

    Excel select a value from a cell having row number calculated

  15. 15

    Range row number reference from another cell in Excel

  16. 16

    How to name all data except for header row in Excel

  17. 17

    excel vba: find the row of a cell with a certain value and put that row number in another cell

  18. 18

    Get a certain value based on table header and row name

  19. 19

    Excel VBA: How to paste a value in the first Cell of the last row of a table?

  20. 20

    How to get the Excel header on each print page to be the first row of the table

  21. 21

    Knitr xtable row color result in 2nd table in the row header cell blacked out

  22. 22

    Using CSS in order to highlight a given table header and first table row on hover of a cell

  23. 23

    How to place values inside table cell according to combination of table header and first row value?

  24. 24

    Get column header and row header on cell click

  25. 25

    Append row and cell to table

  26. 26

    Excel Find Cell Name

  27. 27

    Hide table header if there is no row

  28. 28

    Using the contents of a cell to refer to a worksheet name in a formula

  29. 29

    space between header and table cell

HotTag

Archive