2008年3月23日日曜日

最終行の取得

Function maxLine(tgtCol As Integer) As Long
' 収容最終行の判定(Excel認知の最終行から上に向かってデータがある行を探す)
maxLine = Cells.SpecialCells(xlCellTypeLastCell).Row
Do While Cells(maxLine, tgtCol).Value = ""
maxLine = maxLine - 1
Loop
End Function

0 件のコメント: