Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Start/End Cells in a Range

Hello all,

Having issues with a range and my searching has turned up nothing. I'm
probably missing something obvious, but I don't feel like beating my head
against the wall anymore.

I have a Range object. I'd like to get the row/column values for the start
and end cells of the range. The range is 'Raw Data'!$V$30:$V$51.

To retrieve $V$30, I can use Range.Row (=30) and Range.Column (=22).

How can I retrieve (or calculate) the row/column values for $V$51?

Any suggestions are appreciated.

Thanks,
Jay
--
Disregard, this is so I can find my post later.
***postedbyJay***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Start/End Cells in a Range


Try something like

Dim TheRange As Range
Dim FirstCell As Range
Dim LastCell As Range

Set TheRange = Range("V30:V51")
Set FirstCell = TheRange(1, 1)
Set LastCell = TheRange(TheRange.Cells.Count)
Debug.Print "first: " & FirstCell.Address, _
"last: " & LastCell.Address


You can get the row/column from FirstCell/LastCell by using the Row
and Column properties.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com




On Mon, 12 Apr 2010 10:03:01 -0700, Jay
wrote:

Hello all,

Having issues with a range and my searching has turned up nothing. I'm
probably missing something obvious, but I don't feel like beating my head
against the wall anymore.

I have a Range object. I'd like to get the row/column values for the start
and end cells of the range. The range is 'Raw Data'!$V$30:$V$51.

To retrieve $V$30, I can use Range.Row (=30) and Range.Column (=22).

How can I retrieve (or calculate) the row/column values for $V$51?

Any suggestions are appreciated.

Thanks,
Jay

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Start/End Cells in a Range

Just noting that these slightly shorter Set commands will also work...

Set FirstCell = TheRange(1)
Set LastCell = TheRange(TheRange.Count)

--
Rick (MVP - Excel)



"Chip Pearson" wrote in message
...

Try something like

Dim TheRange As Range
Dim FirstCell As Range
Dim LastCell As Range

Set TheRange = Range("V30:V51")
Set FirstCell = TheRange(1, 1)
Set LastCell = TheRange(TheRange.Cells.Count)
Debug.Print "first: " & FirstCell.Address, _
"last: " & LastCell.Address


You can get the row/column from FirstCell/LastCell by using the Row
and Column properties.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com




On Mon, 12 Apr 2010 10:03:01 -0700, Jay
wrote:

Hello all,

Having issues with a range and my searching has turned up nothing. I'm
probably missing something obvious, but I don't feel like beating my head
against the wall anymore.

I have a Range object. I'd like to get the row/column values for the
start
and end cells of the range. The range is 'Raw Data'!$V$30:$V$51.

To retrieve $V$30, I can use Range.Row (=30) and Range.Column (=22).

How can I retrieve (or calculate) the row/column values for $V$51?

Any suggestions are appreciated.

Thanks,
Jay


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
Serial Number start and end range auto-fill into cells buscher75 Excel Programming 9 December 29th 10 05:30 PM
How to check if a date falls within a range(2 cells: Start/End Dat MarcusMac Excel Worksheet Functions 4 July 30th 08 04:21 PM
Dynamic range - start Stuart Excel Programming 0 January 25th 07 05:26 PM
How do show value range that doesn't start at zero hoffmanjm Charts and Charting in Excel 2 November 3rd 05 08:05 PM
Need to identify the start and end of range Neil Bhandar[_2_] Excel Programming 1 January 15th 04 10:24 PM


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