Solved

Using VBA in Excel, how do I set VB code to goto the first blank cell after a range?

Posted on 2013-01-30
8
320 Views
Last Modified: 2013-01-30
I need my VB code to find / goto the first blank cell after a range, so data can be copied there as the next set of records chosen by a user (a previous set already chosen, that is the previous range to find the next blank cell below).

Thank you!
0
Comment
Question by:AvantGuardDog
  • 4
  • 2
  • 2
8 Comments
 
LVL 10

Expert Comment

by:Anthony Berenguel
ID: 38836178
How are you referring to your range? Have you defined it as a range object?
0
 
LVL 43

Assisted Solution

by:Saqib Husain, Syed
Saqib Husain, Syed earned 250 total points
ID: 38836300
Something like

Range("A2").end(xldown).select
0
 
LVL 10

Accepted Solution

by:
Anthony Berenguel earned 250 total points
ID: 38836343
ssaqibh, I made a minor adjustment (to go to the first blank cell) to your example to meet the requirements of the user.

Range("A2").End(xlDown).Offset(1).Select

Open in new window

0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 38836376
Very much appropriate....Thanks aebea...the credit goes to you

Saqib
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 10

Expert Comment

by:Anthony Berenguel
ID: 38836382
No, no. If anything it should be shared ;-)
0
 

Author Comment

by:AvantGuardDog
ID: 38836677
Thank you ssaqibh and aebea ! ssaqibh's solution combined with aebea's minor adjustment worked perfectly, like a charm.  Very much appreciated!
0
 
LVL 10

Expert Comment

by:Anthony Berenguel
ID: 38836681
Thank you for sharing the credit, AvantGuardDog. Also, i like the wordplay in your username ;-)
0
 

Author Comment

by:AvantGuardDog
ID: 38837418
You are welcome aebea :-) once again, thanks!

ssaqibh, thank you again also, both of your efforts are extremely helpful, and it is very much appreciated!
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now