Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default select last cell in used range


Hi all,

How do I select the last (right, bottom) cell in a used
range.

Have played with the Range(ActiveSheet.UsedRange.Cells
(?).Address).Select - with no luck.

Any help would be appreciated.

Tony.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default select last cell in used range

Hi Tony,

Short snippet example:
Dim lastcell As Range
Set lastcell = Cells.SpecialCells(xlLastCell)
lastcell.EntireRow.Select

The following single line of code should do what you asked:

cells.specialcells(xlLastCell).activate

--
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Tony P" wrote in message ...

Hi all,

How do I select the last (right, bottom) cell in a used
range.

Have played with the Range(ActiveSheet.UsedRange.Cells
(?).Address).Select - with no luck.

Any help would be appreciated.

Tony.



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
Select range of cells from A1 to last cell with data? Bob Arnett Excel Discussion (Misc queries) 8 September 25th 09 04:31 PM
how can I select a range of cells based on a value of a cell? grigoras victor Excel Discussion (Misc queries) 1 June 26th 06 04:55 PM
select first cell in unmerged range Jack Sons Excel Discussion (Misc queries) 2 October 20th 05 03:49 PM
How to select a range whose name is entered in a cell. JD Ami Excel Worksheet Functions 3 October 3rd 05 07:38 PM
using cell values to select range of cells Ray[_9_] Excel Programming 4 October 10th 03 08:31 AM


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