>>893
コード書いてみた
以下のマクロを実行すると変数colで指定した列の最終行が変数rwに入る
例によってシートはWith〜で指定しているので適宜書き換えてください。

Sub test()
Dim col As Long   '処理対象列
Dim rw As Long   '最終行
Dim er As String  '検索するエラー値
Dim rng As Range
With ThisWorkbook.Sheets(1) '処理対象シートの指定
 col = 1   '1列目を指定
 er = "NaN"  'エラー値”NaN"を設定
 rw = .Cells(.Rows.Count, col).End(xlUp).Row
 If .Cells(rw, col).Value = er Then
  Set rng = .Cells(1, col).Resize(rw).Find(What:=er, after:=.Cells(rw, col), _
  LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByColumns, _
  SearchDirection:=xlNext, MatchCase:=True, MatchByte:=True)
  rw = rng.Row - 1
 End If
 Set rng = Nothing
End With
End Sub