+ Reply to Thread
Results 1 to 5 of 5

To make selected columns (or rows) static

  1. #1
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019
    Posts
    436

    To make selected columns (or rows) static

    Hi everyone,

    I have a macro to make cells of selected range static as below. But it is not very efficient if I want to select some columns (or rows) and make them static (I usually copy and paste for the selected columns).

    Please Login or Register  to view this content.
    Do you have a better macro to allow me to select some columns and make the values static more efficiently? that is to make the entire column (or row) static.

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: To make selected columns (or rows) static

    Hi billj,

    The following will work if the cells are all contiguous. If you skip a row or a column, faulty results will occur with the following code:
    Please Login or Register  to view this content.
    The following code should work if the cells are NOT contiguous:
    Please Login or Register  to view this content.
    Lewis
    Last edited by LJMetzger; 12-15-2015 at 11:41 AM. Reason: Added 2nd macro

  3. #3
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: To make selected columns (or rows) static

    Please Login or Register  to view this content.
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  4. #4
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019
    Posts
    436

    Re: To make selected columns (or rows) static

    Many thanks, walruseggman. It works nicely

  5. #5
    Forum Contributor
    Join Date
    01-15-2013
    Location
    London
    MS-Off Ver
    Excel 2003, 2007, 2010, 2019
    Posts
    436

    Re: To make selected columns (or rows) static

    Many thanks, Lewis. It is a good piece knowledge for me. Great!

+ 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] Make all values of rows static if condition met
    By alice2011 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-03-2015, 11:38 AM
  2. Converting selected Rows to columns
    By puneet_kashyap in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2013, 11:44 AM
  3. Variable Rows, static columns in RANK function.
    By NicholasL in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2013, 06:58 PM
  4. Make date and time columns static after hitting Return
    By soireesmagiques in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2012, 11:17 AM
  5. Static Timestamp when an item is selected from a Combobox
    By jigneshoctober in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-01-2011, 01:52 PM
  6. Replies: 3
    Last Post: 06-10-2010, 04:31 PM
  7. Static formula when inserting new rows/columns?
    By nfe in forum Excel General
    Replies: 4
    Last Post: 05-02-2006, 10:00 AM

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