I can't figure out how to make this work.
Sub AutoFill()
Dim R&, F%
R = ActiveCell.Row
Do
F = 1
R = R + 1
If Not IsNumeric Then
MsgBox ("The selection is text, this keyboard shortcut will only work with numbers."), vbOKOnly + vbInformation, "Shortcut Information"
Exit Sub
End If
Else
If IsEmpty(Cells(R, 1)) Then F = 0: Cells(R, 1) = Cells(R - 1, 1)
If IsEmpty(Cells(R, 2)) Then F = 0: Cells(R, 2) = Cells(R - 1, 2) + 1
Loop Until F
End Sub
Check that data is numeric. If not, exit and produce MsgBox. If numeric, continue to check.
Could someone please help? Thanks.