View Single Post
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

You can check the cell above by:

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

mikeburg wrote:

What should I add to the code below to cause it to skip a cell that
contains a text string in the cell above it? I need it to only work on
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.

mikeburg

--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=393456


--

Dave Peterson