View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
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