Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default A1:B(xlDown)?

Hi,

I use

Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select

for column A, but how do I grab from A1 to the last record in row B in
one swoop?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default A1:B(xlDown)?

Dim rng As Range, LastRow As Long
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
Set rng = Range("A1:B"& LastRow)

Mike F
"Simon" wrote in message
...
Hi,

I use

Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select

for column A, but how do I grab from A1 to the last record in row B in
one swoop?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default A1:B(xlDown)?

Range("A1:B" & Range("B1").End(xlDown).Row)



--
Wigi
http://www.wimgielis.be = Excel/VBA, soccer and music


"Simon" wrote:

Hi,

I use

Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select

for column A, but how do I grab from A1 to the last record in row B in
one swoop?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default A1:B(xlDown)?

Range("A1").Resize(Range("A1").End(xlDown).Row).Se lect


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Simon" wrote in message
...
Hi,

I use

Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select

for column A, but how do I grab from A1 to the last record in row B in
one swoop?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 468
Default A1:B(xlDown)?

Needed to use
Range("A1").Resize(Range("B1").End(xlDown).Row, 2).Select

"Bob Phillips" wrote:

Range("A1").Resize(Range("A1").End(xlDown).Row).Se lect


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Simon" wrote in message
...
Hi,

I use

Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select

for column A, but how do I grab from A1 to the last record in row B in
one swoop?






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default A1:B(xlDown)?

On Jul 28, 11:43*am, JMay wrote:
Needed to use
Range("A1").Resize(Range("B1").End(xlDown).Row, 2).Select



"Bob Phillips" wrote:
Range("A1").Resize(Range("A1").End(xlDown).Row).Se lect


--
HTH


Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)


"Simon" wrote in message
...
Hi,


I use


Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select


for column A, but how do I grab from A1 to the last record in row B in
one swoop?- Hide quoted text -


- Show quoted text -


Yes, thansk the ,2) was requred, specifing the number of rows required.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
End(xlDown) not working? RAHokie Excel Discussion (Misc queries) 2 January 19th 07 12:40 AM
End(xlDown) won't work mike Excel Programming 12 September 16th 06 08:50 AM
End(xldown) not always going to last cell? Duncan[_5_] Excel Programming 6 May 4th 06 10:30 AM
repeated end(xldown) R.VENKATARAMAN Excel Programming 6 December 28th 05 06:43 PM
xldown and xlright He4Giv Excel Programming 2 January 29th 04 12:41 AM


All times are GMT +1. The time now is 06:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"