Ok. I think I understand now. Excel evaluates each cell in a linear fashion. Each cell and all of its dependants. So, when one of the lookup values gets changed all 10000 comparisons depend on that new value and the countif statement has to check all 10000 comparisons 10000 times.
I tried replacing the 10000 comparisons with an array formula. It worked MOST of the time but every once in a while the 45 second monster popped up again. So, I changed the countif function to use an indirect reference. That works every time. I also changed test3 to comment out that cell and that works too.
Ron
Sub Test_Search()
Sheets.Add
Range("E1"

.FormulaR1C1 = "Start"
Range("E2"

.FormulaR1C1 = "Stop"
Range("F1"

.Value = Timer
Range("A1"

.FormulaR1C1 = "Search Range"
Range("A2"

.Select
ActiveCell.FormulaR1C1 = "=INT(RAND()*10000)"
Selection.AutoFill Destination:=Range("A2:A10001"

, Type:=xlFillDefault
Range("B1"

.FormulaR1C1 = "Lookup Values"
Range("B2"

.Select
ActiveCell.FormulaR1C1 = "=INT(RAND()*10000)"
Selection.AutoFill Destination:=Range("B2:B21"

, Type:=xlFillDefault
Columns("A:B"

.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("C1"

.FormulaR1C1 = "Item Found"
Range("C2"

.Select
ActiveCell.FormulaR1C1 = "=NOT(ISERROR(MATCH(RC[-2],R2C2:R21C2,0)))"
Selection.AutoFill Destination:=Range("C2:C10001"

, Type:=xlFillDefault
Range("D1"

.FormulaR1C1 = "Count"
Range("D2"

.Select
Range("D3"

.Value = 10001
ActiveCell.Formula = "=COUNTIF(INDIRECT(""C2:C"" & D3),TRUE)"
Range("F3"

.FormulaR1C1 = "=R[-1]C-R[-2]C"
Range("G3"

.FormulaR1C1 = "Seconds"
Columns("A:G"

.EntireColumn.AutoFit
ActiveSheet.Buttons.Add(222, 125, 87, 26).Select
Selection.OnAction = "Test2"
Selection.Characters.Text = "Test 2"
ActiveSheet.Buttons.Add(222, 175, 87, 26).Select
Selection.OnAction = "Test3"
Selection.Characters.Text = "Test 3"
ActiveSheet.Buttons.Add(222, 225, 87, 26).Select
Selection.OnAction = "Try_Again"
Selection.Characters.Text = "Try Again"
Range("A2"

.Select
End Sub
Sub Test2()
Range("E6"

.FormulaR1C1 = "Start"
Range("F6"

.Value = Timer
Range("D3"

.Value = 4
Range("B2"

.Value = Range("A2"

Range("D3"

.Value = 10001
Calculate
Range("E7"

.FormulaR1C1 = "Stop"
Range("F7"

.Value = Timer
Range("F8"

.FormulaR1C1 = "=R[-1]C-R[-2]C"
Range("G8"

.FormulaR1C1 = "Seconds"
End Sub
Sub Test3()
Range("D2"

= "'" & Range("D2"

.FormulaR1C1
Range("E6"

.FormulaR1C1 = "Start"
Range("F6"

.Value = Timer
Range("B2"

.Value = Range("A3"

Range("D2"

.FormulaR1C1 = Right(Range("D2"

, Len(Range("D2"

))
Calculate
Range("E7"

.FormulaR1C1 = "Stop"
Range("F7"

.Value = Timer
Range("F8"

.FormulaR1C1 = "=R[-1]C-R[-2]C"
Range("G8"

.FormulaR1C1 = "Seconds"
End Sub
Sub Try_Again()
Application.DisplayAlerts = False
ActiveSheet.Delete
Application.DisplayAlerts = True
End Sub