Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Resize Dynamic Ranges

VJ,

Try something like the following:

Dim Rng1 As Range
Dim Rng2 As Range
Set Rng1 = Range("D1")
Set Rng2 = Range("A1:C3")
Set Rng1 = Rng1.Resize(Rng2.Rows.Count, Rng2.Columns.Count)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"VJ" wrote in message
...
I have two ranges rng1 and rng2. These are two dynamic ranges.

I need to resize the rng1 according to rng2.

How can I set the size of rng1 to rng2 through VBA code?

Looking for help.

Thanks



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
Dynamic Ranges Graham Excel Worksheet Functions 5 August 29th 07 12:00 AM
Dynamic ranges Brad Charts and Charting in Excel 2 September 8th 06 08:39 PM
Dynamic Ranges ACase Excel Discussion (Misc queries) 4 March 26th 05 10:16 PM
Dynamic Formulas with Dynamic Ranges Ralph Howarth Excel Worksheet Functions 5 January 21st 05 08:44 AM
Resize Dynamic Ranges Frank Kabel Excel Programming 0 July 29th 04 04:16 PM


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