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
337 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

911 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

23 Experts available now in Live!

Get 1:1 Help Now