+ Reply to Thread
Results 1 to 2 of 2

Code to make a Range of Cells Absolute

  1. #1
    Registered User
    Join Date
    10-27-2018
    Location
    Romania
    MS-Off Ver
    excel 2010
    Posts
    19

    Code to make a Range of Cells Absolute

    I have a macro that automatically fills the range A2:C4 with the values from row 1(A1:C1). The problem is that i want it dynamic so when i delete a row from A2:C4, the row 5 will not be filled with the values from row 1. I want to make the Range A2:C4 absolute.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by jeffreybrown; 11-19-2018 at 06:58 PM. Reason: Please use code tags!

  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: Code to make a Range of Cells Absolute

    Hi,

    Create a dynamic range name say 'MyRange' defined as
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then in your code use
    Please Login or Register  to view this content.

    That said this is clearly a much simplified example and probably doesn't represent the size of your actual data. We often find that when we give an answer to what is a trivial non representative example when the solution is used with the real world data it doesn't work because of factors like string length and other stuff which is important but hasn't been mentioned.

    Therefore upload your real workbook (or at least a cut down copy), and manually add the results you expect to see.
    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)

Similar Threads

  1. [SOLVED] How to make VBA code only apply to a range of cells
    By anthony777 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-25-2017, 12:38 PM
  2. [SOLVED] Make the cells absolute
    By LAVA2 in forum Excel General
    Replies: 2
    Last Post: 10-22-2015, 11:29 PM
  3. How to make references absolute in VBA code
    By kasun in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-07-2015, 01:49 AM
  4. Anyone know how to make a Table Range absolute?
    By AstToTheRegionalMGR in forum Excel General
    Replies: 7
    Last Post: 03-31-2015, 11:39 AM
  5. how make vba code work over range of cells
    By sspreyer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-05-2013, 11:42 PM
  6. [SOLVED] How can I make a complete column of 900+ cells Absolute?
    By Bret1 in forum Excel General
    Replies: 4
    Last Post: 06-02-2013, 08:04 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