列名からアルファベットを取得 - VBA
Sub Sample2() Dim num As Long, buf As String num = InputBox("列の数字を入力してください") buf = Cells(1, num).Address(True, False) buf = Left(buf, InStr(buf, "$") - 1) MsgBox buf End Sub
Sub Sample2() Dim num As Long, buf As String num = InputBox("列の数字を入力してください") buf = Cells(1, num).Address(True, False) buf = Left(buf, InStr(buf, "$") - 1) MsgBox buf End Sub