Getting a value from a named range in VBA

前端 未结 2 1593
情深已故
情深已故 2021-01-13 05:32

I want to retrieve a value from named range. Imagine a named range that has X columns and Y rows. I want to return a value, e.g., from column 2, row 3. The issue I experienc

2条回答
  •  梦毁少年i
    2021-01-13 06:14

    This looks like a good place to put a handy note (as it's a top search result):
    If you name a cell "TopLeft", then Sheets(1).Range("TopLeft").Value gets the contents, and Sheets(1).Range("TopLeft").Offset(2,3).Value gets the value from 2 down, 3 across from there.

提交回复
热议问题