Shortcut Notation 从范围获取值的方法
Sub getting_value()
'Static Cell-pointing
Debug.Print [a1] 'for referring Active Sheet's cell
Debug.Print [Sheet1!a1] 'for referring Sheet1's cell
'Partial Dynamic Cell-pointing
Debug.Print [a:b].Cells(1,1) 'for referring Range
Debug.Print [5:5].Cells(1,1) 'for referring Range
Debug.Print [a:b 5:5].Cells(1,1) 'for referring Intersect
Debug.Print [a1,a3].Cells(1,1) 'for referring a1 AND a3
Debug.Print [a1.a3].Cells(1,1) 'for referring a1 TO a3
Debug.Print [a1..a3].Cells(1,1) 'for referring a1 TO a3
Debug.Print [a1:a3].Cells(1,1) 'for referring a1 TO a3
'Dynamic Cell-pointing
Debug.Print [Table1[Column1]].Cells(1,1) 'for referring Table1's column1
Debug.Print [NamedRange] 'for referring Named Range (making named range dynamic by vba -> ThisWorkbook.Names.Add)
End Sub
Reference