Solved

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

Posted on 2016-11-03
3
72 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 31

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 31

Expert Comment

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

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

729 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