Solved

Odd Select Range request.  Select cell and XLDown as long as value is in Column B?

Posted on 2016-11-03
3
28 Views
Last Modified: 2016-11-03
I have an odd request.  I need to copy a range from an active sheet that starts at cell A2 and goes down as long as there is a value in column B, but goes out to column K.  Can this be done in Excel vba?  Please advise and thanks.
0
Comment
Question by:RWayneH
  • 2
3 Comments
 
LVL 28

Accepted Solution

by:
Subodh Tiwari (Neeraj) earned 500 total points
ID: 41872849
Try like this.....
Dim lr As Long
lr = Cells(Rows.Count, 2).End(xlUp).Row
Range("A2:K" & lr).Copy

Open in new window

0
 

Author Closing Comment

by:RWayneH
ID: 41872872
Worked perfectly.  Thanks for the help.
0
 
LVL 28

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41872879
You're welcome. Glad to help.
0

Featured Post

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!

Join & Write a Comment

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

746 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

18 Experts available now in Live!

Get 1:1 Help Now