Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Moving to next cell if current cell is not empty

  1. #1
    New Member
    Join Date
    May 2002
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    This seems like a really simple thing to do, but I can't seem to do it without specifying an exact cell to move to.

    Basically, I am creating a form to collect data and store it on an excel sheet. Each time the user presses the "continue" button on the form, it should go to a new row in the sheet storing the data, and input the new row of info. I can't work out how to get it to check for the next available row and then move to it to store the data.

    Sorry if this sounds long winded, but your help would be appreciated.

    Regards,
    Del

  2. #2
    Board Regular
    Join Date
    May 2002
    Posts
    810
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    It's hard to give much specific advice, since you didn't give much specific behavior.


    There is a Next property for Range, so you could do something like these:

    activecell.next.Select

    cells(Activecell.Row+1,1).select

    Open an Immediate window in VBA editor and see if either of this fit your needs.

  3. #3
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-05-12 07:22, delboy74 wrote:
    This seems like a really simple thing to do, but I can't seem to do it without specifying an exact cell to move to.

    Basically, I am creating a form to collect data and store it on an excel sheet. Each time the user presses the "continue" button on the form, it should go to a new row in the sheet storing the data, and input the new row of info. I can't work out how to get it to check for the next available row and then move to it to store the data.

    Sorry if this sounds long winded, but your help would be appreciated.

    Regards,
    Del
    Hi Del, If I understand you correctly then
    you have data basically like;
    Microsoft Excel - Book2_______________Running: xl2000 : OS = Windows (32-bit) 4.10
    (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp
    A1=Data1
    ABCDE
    1Data1Data2Data3Data4Data5
    2Criteria1Info1Blah1Test1Trend1
    3Criteria2Info2Blah2Test2Trend2
    4Criteria3Info3Blah3Test3Trend3
    5Criteria4Info4Blah4Test4Trend4
    6Criteria5Info5Blah5Test5Trend5
    7Criteria6Info6Blah6Test6Trend6
    8Criteria7Info7Blah7Test7Trend7
    9Criteria8Info8Blah8Test8Trend8
    10Criteria9Info9Blah9Test9Trend9
    11Criteria10Info10Blah10Test10Trend10
    12Criteria11Info11Blah11Test11Trend11
    13Criteria12Info12Blah12Test12Trend12
    14 << Next Row
    Sheet1

    To see the formula in the cells just click on the cells hyperlink

    The above image was automatically generated by [HtmlMaker V1.20]
    If you want this code, click here and Colo will email the file to you.
    This code was graciously allowed to be modified: by Ivan F Moala All credit to Colo


    In order to get the Last row assuming
    1) Data starts in Column A as above
    2) Data is continuous

    Then something like this will give you the
    Next blank row to input data into.


    Dim dNxtRow As Long

    dNxtRow = Cells(Rows.Count, 1).End(xlUp).Row + 1
    Cells(dNxtRow, 1) = "Your Data"





    _________________
    Kind Regards,
    Ivan F Moala

    Have a Nice day

    [ This Message was edited by: Ivan F Moala on 2002-05-12 11:25 ]

  4. #4
    New Member
    Join Date
    May 2002
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thats great Ivan, thanks. Problem solved.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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