+ Reply to Thread
Results 1 to 2 of 2

How to skip cells with text strings.

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-23-2005
    Posts
    253

    How to skip cells with text strings.

    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

  2. #2
    Dave Peterson
    Guest

    Re: How to skip cells with text strings.

    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1