VBA has a way to tell the type of data in a cell. It is TypeName
If TypeName(ActiveSheet.Cells(r, 1).Value) <> "Double" Then
' If non-number, abort
Debug.Print " - - - no frequency - - -"
Else ' Belongs to TypeName
Debug.Print " - frequency present -"
f = ActiveSheet.Cells(r, 1)