|
それなら、いったん表紙シートの最終行あたりに値のみコピーして、
そこを探す数式を近くの行に入れる。ということでどうでしょーか ?
Private Sub CommandButton1_Click()
Dim FSt As String
Dim C As Range
Dim xC As Long, GetR As Long
FSt = Range("A5").Value
Rows("65536:65536").Value = _
Worksheets("入力").Rows("2:2").Value
On Error Resume Next
With Range("A65536", Range("IV65536").End(xlToLeft)).Offset(-1)
.Formula = "=FIND(" & """" & FSt & """"",A$65536)"
For Each C In .SpecialCells(3, 1)
xC = C.Column
GetR = Worksheets("入力").Cells(65536, xC).End(xlUp).Row
Debug.Print xC & " 列は " & GetR & " 行"
Next
.Resize(2).ClearContents
End With
End Sub
|
|