投稿‎ > ‎

Excelの列番号と列名の相互変換

posted Dec 23, 2014, 4:42 PM by Zhang Wenxu   [ updated Jan 4, 2015, 3:42 PM ]
Public Function colName(col As Integer) As String
  colName = Mid(Cell(1, col).address, 2, InStr(2, Cells(1, col).address, "$") - 2)
End Function

Public Function colNum(name As String) As Integer
  colNum = Range(name & 1).Column
End Function
Comments