79382952

Date: 2025-01-24 00:35:03
Score: 0.5
Natty:
Report link

If your numbers are constant values you can simply extend your code as proposed by @taller, but you can still rely on the Range.Find procedure:

Sub LastNumber()
  Dim LastRow As Long
  LastRow = ActiveSheet.Range("A6:A167").SpecialCells(xlCellTypeConstants, xlNumbers) _
  .Find(What:="*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
  MsgBox LastRow
End Sub
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @taller
Posted by: MGonet