Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default selecting a range

I am having a macro insert data into a worksheet, and need to have it go to
the last populated cell, then copy up 31 cells. I figured out how to find
the last cell, however can't seem to get it to copy the range. I'm new at
this so any help would be appreciated.
Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default selecting a range


Dear Sir

Once you have selected the last cell try this:

Selection.Offset(-30, 0).Resize(31, 1).Copy

What it does?

With the last cell selected move the pointer 30 cells up "Offset
(-30,0)" then expand the selection to cover 31 cells down
"resize(31,1), and copy the selected range. Please, let me know if
that solve your problem.

regards

Juan Carlos


--
cscorp
------------------------------------------------------------------------
cscorp's Profile: http://www.excelforum.com/member.php...o&userid=24015
View this thread: http://www.excelforum.com/showthread...hreadid=376981

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
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
Help please in selecting range dependent on another range MickJJ Excel Programming 2 January 10th 05 12:01 PM
Selecting a Range inside a range hcova Excel Programming 0 July 13th 04 03:26 PM
Selecting range Indu Aronson[_2_] Excel Programming 4 November 19th 03 04:47 PM
Selecting A Range russell \(skmr3\) Excel Programming 1 July 22nd 03 03:25 AM


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