+ Reply to Thread
Results 1 to 2 of 2

I am trying to create a new range, the size of a different range.

  1. #1
    Registered User
    Join Date
    04-11-2012
    Location
    chicago
    MS-Off Ver
    Excel 2010
    Posts
    15

    I am trying to create a new range, the size of a different range.

    I am trying to create a new range, the size of a different range.

    So, my old range is test1
    I can get the number of columns and rows
    range("test1").Rows.count
    range("test1").Columns.count

    However, now I want to create a new range, that size, starting at G5
    How can you get the ending column? G + Columns.count isn't going to work?

    Is there an easy way of doing this?

    thanks

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: I am trying to create a new range, the size of a different range.

    Hi,

    Perhaps

    Range("G5").Resize(Range("test1").rows.count,Range("test1").columns.count).Name = "MyNewRangeName"
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1