+ Reply to Thread
Results 1 to 4 of 4

Range formula with variable

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Range formula with variable

    Hello:

    I have
    M = Range("M1").Value
    R = Range("M2").Value
    M3 = 56
    M4 = 57

    I need to create formula by using above formula : X = Range(M56:R67).

    Something like : X = Range("M"&M3:"R"&M4)

    Basically want to select the Range M56:R67 to be copied/

    Please let me know if you have any questions.
    Thanks.

    RM

  2. #2
    Registered User
    Join Date
    12-19-2015
    Location
    Hyderabad, India
    MS-Off Ver
    2007
    Posts
    16

    Re: Range formula with variable

    try this.. should work..

    Range("M" & M3 & ":R" & M4).select - this line is to select

    Range("M"&M3 & ":R" & M4).copy - this line is to copy

  3. #3
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Range formula with variable

    Hi Madhut:

    Works ....Thanks a lot
    Riz

  4. #4
    Registered User
    Join Date
    12-19-2015
    Location
    Hyderabad, India
    MS-Off Ver
    2007
    Posts
    16

    Re: Range formula with variable

    Quote Originally Posted by rizmomin View Post
    Hi Madhut:

    Works ....Thanks a lot
    Riz
    Glad that this works for you.

    It would be great, if you could click on "Add Reputation" on my post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Insert Formula with Variable Range
    By excel6000 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-10-2015, 04:27 PM
  2. Insert Formula with Variable Range
    By excel6000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-10-2015, 05:16 AM
  3. Using a range variable in a formula
    By rachmanchester in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2014, 04:11 PM
  4. [SOLVED] Use a variable in Range.Formula
    By jewelsharma in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2014, 05:40 AM
  5. [SOLVED] Formula Array with a variable range
    By KParkerTX in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-01-2013, 04:25 PM
  6. [SOLVED] Use variable range in a formula
    By Mumps1 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 05-20-2013, 07:18 PM
  7. Range and Variable formula
    By tlm in forum Excel General
    Replies: 3
    Last Post: 02-10-2010, 03:20 PM

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