Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How do i find the last cell range in a sheet

What is the VBA command to find the last cell range on a worksheet?

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How do i find the last cell range in a sheet

Sub Last()

MsgBox "Last cell is " & _
ActiveSheet.UsedRange.SpecialCells(xlLastCell).Add ress
End Sub

Jon

Phil Hunt wrote:

What is the VBA command to find the last cell range on a worksheet?

Thanks





--
42°57N 81°16W


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How do i find the last cell range in a sheet

That was quick. I may have more question later. This is my first time
programming Excel


"Crash" wrote in message
...
Sub Last()

MsgBox "Last cell is " & _
ActiveSheet.UsedRange.SpecialCells(xlLastCell).Add ress
End Sub

Jon

Phil Hunt wrote:

What is the VBA command to find the last cell range on a worksheet?

Thanks





--
42°57N 81°16W




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How do i find the last cell range in a sheet

set rng = Cells.SpecialCells(xlCellTypeLastCell)

finds the lower right corner of the usedrange. It may not be what you
expect however.

--
Regards,
Tom Ogilvy

"Phil Hunt" wrote in message
...
What is the VBA command to find the last cell range on a worksheet?

Thanks




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How do i find the last cell range in a sheet

Thanks guy. works great.


"Phil Hunt" wrote in message
...
What is the VBA command to find the last cell range on a worksheet?

Thanks






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
Find Last cell in Range when range is date format default105 Excel Discussion (Misc queries) 5 July 7th 09 03:11 PM
find last cell in range with data, display cell address sevi61 Excel Worksheet Functions 14 October 29th 07 08:36 PM
Find if any cell in range is above Zero [email protected] Excel Discussion (Misc queries) 3 April 19th 06 11:01 AM
Using VB to find next cell in range David McRitchie[_2_] Excel Programming 0 July 23rd 03 02:21 AM
Using VB to find next cell in range Bob Kilmer Excel Programming 0 July 23rd 03 02:19 AM


All times are GMT +1. The time now is 03:15 AM.

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"