以下の内容はhttps://www.k-hitorigoto.online/entry/2017/01/08/004330より取得しました。


最下行アドレスを取得する(ExcelVBA)

カレントセルの列の、最下行アドレス(値の入力された最下行のアドレス)を取得する。

Option Explicit

Sub カレントセル列の最後尾アドレスを取得する()
    Dim currentRange As Range
    Dim maxRowNum As Integer
    Dim tmpColumnName As String
    Dim columnName As String
    
    Set currentRange = Cells(Rows.Count, ActiveCell.Column)
    maxRowNum = currentRange.End(xlUp).Row
    tmpColumnName = currentRange.Address(True, False)
    Set currentRange = Nothing
    
    columnName = Left(tmpColumnName, InStr(tmpColumnName, "$") - 1)
    Debug.Print columnName & maxRowNum
End Sub



以上の内容はhttps://www.k-hitorigoto.online/entry/2017/01/08/004330より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14