Results 1 to 4 of 4

Worksheet change event to move values up over non-contiguous ranges (remove spaces)

Threaded View

  1. #1
    Forum Contributor
    Join Date
    10-08-2013
    Location
    London
    MS-Off Ver
    365
    Posts
    136

    Worksheet change event to move values up over non-contiguous ranges (remove spaces)

    Hi All,

    I have two non-contiguous ranges that I would like to have a worksheet change event move values up as they are entered into cells within the range. The net result should be to move values up to ensure that the cell below the last used cell is the next cell to be populated. I have attached an example of what I mean including before and after examples. I have tried several ways to find the last used cell and move values up based on that if the cell above is blank but have had no joy in getting it to work.

    The code should concentrate on values in columns C & N and move adjacent values in columns D & O at the same time. This is to ensure any values pasted into cell pairs at the same time are moved at the same time. As soon as a value is moved, the row in columns C or N where the value has been relocated should be selected. I'm not sure if a worksheet change event applies to every key stroke or after enter has been pressed? If the code applied after the full value had been entered this would be great but understand if this is not possible. I do not need to sort the values at the same time, just move them up.

    Alternatively, if this is not possible or is too difficult, I would be happy if the values could be reshuffled on the click of a command button. I have included this in the sample sheet just in case!

    Could anyone please assist? The example is an exact copy of the format the full worksheet uses so was hoping that any VBA applied would be utilising this.

    Many thanks,
    Attached Files Attached Files
    Dave C

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Repeating Worksheet Change Event on Different Ranges
    By Tanooki in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-22-2014, 09:43 PM
  2. [SOLVED] Worksheet change event applying to multiple ranges
    By MaddyG in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-29-2013, 12:04 PM
  3. [SOLVED] Worksheet change event to Formulate Cells for multiple Ranges
    By trickyricky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-15-2012, 02:38 PM
  4. TTest with values in non-contiguous ranges
    By Domenic in forum Excel Formulas & Functions
    Replies: 35
    Last Post: 09-06-2005, 07:05 PM
  5. [SOLVED] TTest with values in non-contiguous ranges
    By Kristina in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  6. TTest with values in non-contiguous ranges
    By Kristina in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  7. [SOLVED] How to Remove Non-Contiguous Columns from Worksheet
    By sjane in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-06-2005, 02:06 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