需要Excel原始碼的網友請點擊關注和轉發給大家共享,然後直接私信回覆:原始碼
示例代碼:
#001 Public Sub 示例()
#002 Dim i As Byte
#003 Dim j As Byte
#004 Range("A1").Value = ""
#005 Range("B6").Value = "我的行列號是"
#006 i = Range("B6").Row '獲取B6行號
#007 j = Range("B6").Column '獲取B6列號
#008 Range("A1").Value = "B6單元格行號是:" & i & "列號是:" & j
#009 End Sub
運行結果如所示:
圖218Row和Column屬性獲取單元格行列號
代碼說明:
Row屬性對單元格來說返回的是單元格的行號,Colum屬性對單元格來說返回的是單元格的行號