Set src = Range("A23:AA24")
Set dest = Range("A27")
With src
Set dest = dest.Resize(.Rows.Count, .Columns.Count)
End With
Debug.Print dest.Address ' $A$27:$AA$28
Before resizing you might also want to ensure the new range does would not
extend off the sheet.
Regards,
Peter T
<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I am using the OWC and i need to build a range from another range
> using a starting cell.
>
> So i have
> src.address = "A23:AA24"
> dest.address = "A27"
>
> I need to calculate the end of the range based on the dest.address
> cell.
> the end result would be
>
> dest.address = "A27:AA28"
>
> I need to do this wil Excel vba... any ideas?
>
> thanks
> TT
>
|