Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Selecting Till last row

Hi
I used the following code in a macro
Range(Selection, Selection.End(xlDown)).Select 'the same as
CTRL-SHIFT-DownArrow

This does not work if there is emty rows (only selects till it finds the
first emty row)

Is there another function to select till the last row that is populated ?

Thanks a lot
Alfred

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Selecting Till last row

you can try this

Range(Selection, Cells(Rows.Count, Selection.Column).End(xlUp)).Select


--


Gary


"Alfred" wrote in message
...
Hi
I used the following code in a macro
Range(Selection, Selection.End(xlDown)).Select 'the same as
CTRL-SHIFT-DownArrow

This does not work if there is emty rows (only selects till it finds the first
emty row)

Is there another function to select till the last row that is populated ?

Thanks a lot
Alfred



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
Loop till value changes Ruben Excel Discussion (Misc queries) 2 August 27th 08 09:07 AM
Looping till value is 1? Jo[_2_] Excel Discussion (Misc queries) 2 October 3rd 07 09:14 PM
Locating the row that has no values. Selecting that row till the last row after that and deleting it? VB Script for Excel Excel Programming 2 May 25th 06 01:19 PM
SUM C IF B=Cap... Till Next B=Cap... cradino Excel Worksheet Functions 6 October 13th 05 12:45 AM
SUM C IF B=Cap...TILL NEXT B=Cap... cradino Excel Worksheet Functions 1 October 10th 05 01:05 AM


All times are GMT +1. The time now is 12:10 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"