LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default getting the column and rows from a selection

I'm using the three lines below to select all of the cells in a worksheet
table that have data.

Range("E7").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select

This line gives me the row number of the last row in the selection, but I
can't figure out how to get the column number of the last column in the
selection.

cRows = Cells(Rows.Count, "A").End(xlUp).Row

Any ideas ? thanks.


 
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
Automatic Selection of Multiple Rows Emmlie Excel Worksheet Functions 3 August 7th 08 06:43 PM
Looping a selection of rows Andre Kruger Excel Discussion (Misc queries) 1 December 15th 05 04:18 PM
Selection of Rows Alan Excel Programming 2 June 30th 04 05:32 PM
Get rows which match selection criteria Fred Smith Excel Programming 1 February 21st 04 03:52 AM
Selection.End(xlDown) with Rows selected Tokash Excel Programming 1 August 19th 03 03:52 PM


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