Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Business Applications Business Applications
Search Search
Search for:
Tech Support Guy > > >

Excel-Moving to next cell using VBA


(!)

Anupam's Avatar
Anupam Anupam is offline
Junior Member with 16 posts.
THREAD STARTER
 
Join Date: Aug 2004
Experience: Intermediate
09-Aug-2004, 01:26 PM
Exclamation Excel-Moving to next cell using VBA
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

Last edited by Anupam; 09-Aug-2004 at 01:52 PM..
~Candy~'s Avatar
Retired Administrator with 103,708 posts.
 
Join Date: Jan 2001
Experience: Advanced
09-Aug-2004, 01:42 PM
Hi and welcome. Let me move you to business applications for better assistance.
Rollin_Again's Avatar
Member with 4,692 posts.
 
Join Date: Sep 2003
Location: Atlanta, GA - Planet Earth
Experience: Advanced
09-Aug-2004, 01:50 PM
Code:
Range("A2").End(xlDown).Offset(1, 0).Select
or
Code:
Range("A" & Cells(Rows.Count, "A").End(xlUp).Row + 1).Select

Rollin

Last edited by Rollin_Again; 09-Aug-2004 at 02:04 PM..
Zack Barresse's Avatar
Computer Specs
Member with 5,434 posts.
 
Join Date: Jul 2004
Location: Oregon, United States
Experience: I'ma learnin'!
09-Aug-2004, 02:31 PM
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

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
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.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!


Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑