Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
384 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 1000 total points
ID: 38836300
Something like

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

Accepted Solution

by:
Anthony Berenguel earned 1000 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 43

Expert Comment

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

Saqib
0
 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
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.

824 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