Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default Create Range from Range

Excel VBA:
Let's say I have a range object set to be from B2:F6, and i need to
make another range object to be the last row of my original range.
(New range to be B6:F6) How would i go about doing this? I tried
the .Resize option, but that only works from the top left cell of a
range.

DK
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 420
Default Create Range from Range

Another method:

Dim Rng1 as range
Dim Rng2 as range

set rng1 = activesheet.range("b2:F6")
set rng2 = rng1.rows(rng1.rows.count)

or
with rng1
set rng2 = .rows(.rows.count)
end with



dksaluki wrote:

Excel VBA:
Let's say I have a range object set to be from B2:F6, and i need to
make another range object to be the last row of my original range.
(New range to be B6:F6) How would i go about doing this? I tried
the .Resize option, but that only works from the top left cell of a
range.

DK


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 48
Default Create Range from Range

man, it seems so easy when you see it! thank guys!

DK

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
How do I enter formula sum(range+range)*0.15 sumif(range=3) tkw Excel Discussion (Misc queries) 2 October 1st 09 09:17 PM
How do I create a Range Name? Curious New Users to Excel 7 December 14th 07 09:13 PM
Excel Addin:Setting the range to the Excel.Range object range prop Rp007 Excel Worksheet Functions 5 November 24th 06 04:30 PM
Trying to create a range in an IF function dmorgenstern Excel Worksheet Functions 2 March 6th 06 07:26 PM
how do i create range names ? april Excel Worksheet Functions 1 September 5th 05 04:33 AM


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