Select any cell in the desired column and run the macro
Option Explicit
Sub MacroToCallFromToolsMenu()
Dim StartFromBottom As Range
Dim FoundPrevious As Range
Set StartFromBottom = ActiveSheet.Cells(Rows.Count, Selection.Column).End(xlUp)
Set FoundPrevious = StartFromBottom.EntireColumn.Find(What:=StartFromBottom, SearchDirection:=xlPrevious, _
After:=StartFromBottom)
If FoundPrevious Is Nothing Then Set FoundPrevious = StartFromBottom.EntireColumn.Find _
(What:=CStr(StartFromBottom), SearchDirection:=xlPrevious, After:=StartFromBottom)
If FoundPrevious Is Nothing Then
MsgBox "Did not find a previous entry for " & StartFromBottom
Exit Sub
End If
StartFromBottom.Offset(0, 3) = StartFromBottom.Row - FoundPrevious.Row
End Sub
Doubleclick any cell in columns U or AI and the macro will run
Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, Range("U:U")) Is Nothing And Intersect(Target, Range("AI:AI")) Is Nothing Then Exit Sub
Cancel = True
Dim StartFromBottom As Range
Dim FoundPrevious As Range
Set StartFromBottom = ActiveSheet.Cells(Rows.Count, Target.Column).End(xlUp)
Set FoundPrevious = StartFromBottom.EntireColumn.Find(What:=StartFromBottom, SearchDirection:=xlPrevious, _
After:=StartFromBottom)
If FoundPrevious Is Nothing Then Set FoundPrevious = StartFromBottom.EntireColumn.Find _
(What:=CStr(StartFromBottom), SearchDirection:=xlPrevious, After:=StartFromBottom)
If FoundPrevious Is Nothing Then
MsgBox "Did not find a previous entry for " & StartFromBottom
Exit Sub
End If
StartFromBottom.Offset(0, 3) = StartFromBottom.Row - FoundPrevious.Row
End Sub
Thanks, p45cal for that notice about numbers as text.