Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default (xlDown) not working properly!


i have columns A2:T2 selected and then i do this:
Range(Selection, Selection.End(xlDown)).Select
but it only selects up to the last row in column T but other cols ar
longer...
is there anyway to fix this so that it selects down to the longest col

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default (xlDown) not working properly!

aapp81

It should select down to the last value in column A, not T. Anyway, try
this

Selection.CurrentRegion.Select

and see if that doesn't give you the proper range.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"aapp81" wrote in message
...

i have columns A2:T2 selected and then i do this:
Range(Selection, Selection.End(xlDown)).Select
but it only selects up to the last row in column T but other cols are
longer...
is there anyway to fix this so that it selects down to the longest col?


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to

creating financial statements


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default (xlDown) not working properly!


Dick Kusleika wrote:
*aapp81

It should select down to the last value in column A, not T. Anyway
try
this

Selection.CurrentRegion.Select

and see if that doesn't give you the proper range.
*


yeah, i thought about doing that but i have headings in A1:T1 and doin
"currentregion" selects them as well... and i want it to start fro
row

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default (xlDown) not working properly!

set rng = selection.CurrentRegion
if rng.row = 1 then _
set rng = rng.offset(1,0).Resize(rng.rows.count-1)

rng.Select

--
Regards,
Tom Ogilvy


"aapp81" wrote in message
...

Dick Kusleika wrote:
*aapp81

It should select down to the last value in column A, not T. Anyway,
try
this

Selection.CurrentRegion.Select

and see if that doesn't give you the proper range.
*


yeah, i thought about doing that but i have headings in A1:T1 and doing
"currentregion" selects them as well... and i want it to start from
row2


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to

creating financial statements


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default (xlDown) not working properly!


thank you very much!


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default (xlDown) not working properly!

Here's one way...

With Selection
.Resize(.CurrentRegion.Rows.Count - .Row + 1, _
.CurrentRegion.Columns.Count).Select
End With


Regards,
Vic Eldridge


aapp81 wrote in message ...
i have columns A2:T2 selected and then i do this:
Range(Selection, Selection.End(xlDown)).Select
but it only selects up to the last row in column T but other cols are
longer...
is there anyway to fix this so that it selects down to the longest col?


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default (xlDown) not working properly!

Hey Vic ... long time no see!

Regards,

Vasant.

"Vic Eldridge" wrote in message
m...
Here's one way...

With Selection
.Resize(.CurrentRegion.Rows.Count - .Row + 1, _
.CurrentRegion.Columns.Count).Select
End With


Regards,
Vic Eldridge


aapp81 wrote in message

...
i have columns A2:T2 selected and then i do this:
Range(Selection, Selection.End(xlDown)).Select
but it only selects up to the last row in column T but other cols are
longer...
is there anyway to fix this so that it selects down to the longest col?


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to

creating financial statements


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default (xlDown) not working properly!

Hey Vic ... long time no see!

Regards,

Vasant.



Howdy Vasant.

Yeah it's been a while. I wonder how many Application.ScreenUpdating
= False's I missed out on. ;-)

I see you've been crowned an MVP. Well Done !


Regards,
Vic Eldridge
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
End(xlDown) not working? RAHokie Excel Discussion (Misc queries) 2 January 19th 07 12:40 AM
But not working properly Rao Ratan Singh Excel Discussion (Misc queries) 2 September 14th 06 08:45 AM
datasort not working properly ludditefreak Excel Discussion (Misc queries) 1 March 8th 06 03:00 PM
Why is my tab key not working properly any more in Excel? Steelman46 Excel Worksheet Functions 2 February 23rd 06 04:21 PM
ActiveCell.End(xlDown).Select not working consistently reclusive monkey Excel Programming 2 October 13th 03 02:28 PM


All times are GMT +1. The time now is 10:40 AM.

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"