LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Resize CurrentRegion by 2 rows at the bottom

On Wed, 4 Mar 2009 12:54:52 -0500, "Rick Rothstein"
wrote:

I see from your posting that I misinterpreted what the OP was looking for.
As you may remember from other postings of mine, I have this "thing" for
one-liners; so, while not a practical solution to the OP's question (I would
do it the way you posted), I thought those reading this thread might find
this one-liner of interest anyway...

Range("A3:" & Split(Range("A1").CurrentRegion.Address, ":")(1)).Select

It selects the same range your code would (if you had specified Select
instead of Address on your last line of code). HOWEVER, the code requires
that at least one line of data exists (or else the 2nd header row would be
selected).


What I noted about your previous posting was that it only moved the current
region down two rows, but didn't resize it.

You can combine my two lines into one (obviously excluding the debug.print
lines), but I chose not too to make it easier for the OP to follow the logic.
--ron
 
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
Error with Selection.CurrentRegion.Rows.Count? KenY Excel Programming 2 April 21st 10 11:01 AM
Incorrect CurrentRegion.SpecialCells(xlVisible).Rows.Count on filt KenY Excel Programming 2 February 6th 09 04:45 PM
Can't get to bottom right corner of window to resize? I figured it Michael NoNOTooMuch Excel Discussion (Misc queries) 1 April 14th 08 11:06 PM
How to select the bottom right cel in a 'CurrentRegion.selecion' Luc Excel Programming 3 March 3rd 07 07:58 PM
Selecting multiple rows within a CurrentRegion Brian J. Matuschak Excel Programming 1 May 18th 06 05:12 AM


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