数式もしくは値が入力されている最終セルを取得する。

Option Explicit
Sub A_Sample018()
Dim myRng As Range
Set myRng = Rows(1).Find(What:=”*”, After:=Range(“A1”) _
, LookIn:=xlFormulas, SearchDirection:=xlPrevious)
If myRng Is Nothing Then
MsgBox “何も入力されていません。”
Else
MsgBox myRng.Address
End If
End Sub

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です