1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Excel-Moving to next cell using VBA

Discussion in 'Business Applications' started by Anupam, Aug 9, 2004.

Thread Status:
Not open for further replies.
Advertisement
  1. Anupam

    Anupam Thread Starter

    Joined:
    Aug 8, 2004
    Messages:
    16
    Range("A2").end(xldown)

    If I want to move to next cell, what statement i have to write.
    want the next cell in downwards directions as using Range("A2").end(xldown).next.select takes me towards right direction
     
  2. ~Candy~

    ~Candy~ Retired Administrator

    Joined:
    Jan 27, 2001
    Messages:
    103,706
    Hi and welcome. Let me move you to business applications for better assistance.
     
  3. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,732
    Code:
    Range("A2").End(xlDown).Offset(1, 0).Select
    or
    Code:
    Range("A" & Cells(Rows.Count, "A").End(xlUp).Row + 1).Select

    Rollin
     
  4. Zack Barresse

    Zack Barresse

    Joined:
    Jul 25, 2004
    Messages:
    5,447
    Hi,

    Also, if you're wanting to find the last row with data in it, then move one down, starting from A2 will fail if you have holes in your data. If that be the case, it's always better to start from the bottom and work your way up. Maybe ...


    Code:
    Range("A65536").End(xlUp).Offset(1).Select
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/259962