Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Last cell (not blank)

Hello,

How do you translate in VBA the selection from the current cell down to the
last one (not blank).
If I had to do the operation manually in a workbook, I would select the
first cell, then hold SHIFT, press END then ARROW DOWN.

Thank you.

Eric


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Last cell (not blank)

basically the same way:

Range("a1").End(xlDown).Select

although you rarely need to use select, but this illustrates what you want.

--


Gary


"Eric" wrote in message
...
Hello,

How do you translate in VBA the selection from the current cell down to the
last one (not blank).
If I had to do the operation manually in a workbook, I would select the
first cell, then hold SHIFT, press END then ARROW DOWN.

Thank you.

Eric




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Last cell (not blank)

Gary,

This goes to the last cell non blank. How do I "select" from the current
cell down to the last cell? The SHIFT part in not translated in
Range("a1").End(xlDown).Select.

Thank you again.

Eric

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
basically the same way:

Range("a1").End(xlDown).Select

although you rarely need to use select, but this illustrates what you

want.

--


Gary


"Eric" wrote in message
...
Hello,

How do you translate in VBA the selection from the current cell down to

the
last one (not blank).
If I had to do the operation manually in a workbook, I would select the
first cell, then hold SHIFT, press END then ARROW DOWN.

Thank you.

Eric






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Last cell (not blank)


is this what you want?

Range(ActiveCell, ActiveCell.End(xlDown)).Select
--


Gary


"Eric" wrote in message
...
Gary,

This goes to the last cell non blank. How do I "select" from the current
cell down to the last cell? The SHIFT part in not translated in
Range("a1").End(xlDown).Select.

Thank you again.

Eric

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
basically the same way:

Range("a1").End(xlDown).Select

although you rarely need to use select, but this illustrates what you

want.

--


Gary


"Eric" wrote in message
...
Hello,

How do you translate in VBA the selection from the current cell down to

the
last one (not blank).
If I had to do the operation manually in a workbook, I would select the
first cell, then hold SHIFT, press END then ARROW DOWN.

Thank you.

Eric








  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Last cell (not blank)

Yes, perfect.
What if I need to include also 3 more columns to the right.

Thank you for helping me going through the VBA learning curve...

Eric

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...

is this what you want?

Range(ActiveCell, ActiveCell.End(xlDown)).Select
--


Gary


"Eric" wrote in message
...
Gary,

This goes to the last cell non blank. How do I "select" from the current
cell down to the last cell? The SHIFT part in not translated in
Range("a1").End(xlDown).Select.

Thank you again.

Eric

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
basically the same way:

Range("a1").End(xlDown).Select

although you rarely need to use select, but this illustrates what you

want.

--


Gary


"Eric" wrote in message
...
Hello,

How do you translate in VBA the selection from the current cell down

to
the
last one (not blank).
If I had to do the operation manually in a workbook, I would select

the
first cell, then hold SHIFT, press END then ARROW DOWN.

Thank you.

Eric












  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Last cell (not blank)

try this

Range(Range("a1"), Range("a1").End(xlDown)).Resize(, 3).Select

--


Gary


"Eric" wrote in message
...
Yes, perfect.
What if I need to include also 3 more columns to the right.

Thank you for helping me going through the VBA learning curve...

Eric

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...

is this what you want?

Range(ActiveCell, ActiveCell.End(xlDown)).Select
--


Gary


"Eric" wrote in message
...
Gary,

This goes to the last cell non blank. How do I "select" from the current
cell down to the last cell? The SHIFT part in not translated in
Range("a1").End(xlDown).Select.

Thank you again.

Eric

"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
basically the same way:

Range("a1").End(xlDown).Select

although you rarely need to use select, but this illustrates what you
want.

--


Gary


"Eric" wrote in message
...
Hello,

How do you translate in VBA the selection from the current cell down

to
the
last one (not blank).
If I had to do the operation manually in a workbook, I would select

the
first cell, then hold SHIFT, press END then ARROW DOWN.

Thank you.

Eric












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
How to return a blank formula cell if the reference is blank? waybomb Excel Worksheet Functions 2 January 22nd 09 05:53 PM
Average Formula to display blank cell if named range is blank Rachael F Excel Worksheet Functions 3 February 22nd 08 05:05 PM
Copy to first Blank cell in Colum C Non blank cells still exist be Ulrik loves horses Excel Programming 2 October 8th 06 07:35 PM
How do I make a blank cell with a date format blank? Pivot Table/Query Excel Worksheet Functions 6 June 14th 05 11:19 PM
COPY A CONCATENATE CELL TO BLANK CELL PUTTING IN THE NEXT BLANK C. QUEST41067 Excel Discussion (Misc queries) 1 January 15th 05 09:29 PM


All times are GMT +1. The time now is 07:03 PM.

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

About Us

"It's about Microsoft Excel"