How to skip cells with text strings.

M

mikeburg

What should I add to the code below to cause it to skip a cell tha
contains a text string in the cell above it? I need it to only work o
numbers in the cell above it.

If ActiveCell.Offset(rowoffset:=-1) <> "" Then
ActiveCell = ActiveCell.Offset(rowoffset:=-1) + 1
Application.SendKeys ("{Enter}")
End If

Thanks so much.

mikebur
 
D

Dave Peterson

You can check the cell above by:

if isnumeric(activecell.offset(-1,0)) then
'it's numeric.
else
'it's not
end if
 
Top