+ Reply to Thread
Results 1 to 3 of 3

Prevent data cell overwrite but allow blank cell overwrite

  1. #1
    Registered User
    Join Date
    03-09-2011
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    2

    Prevent data cell overwrite but allow blank cell overwrite

    Hi,
    Anyone know how to prevent a cell with data being overwritten when dragging and dropping data from another cell, whilst allowing a blank cell to be overwritten with the dragged data ?
    Thanks

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Prevent data cell overwrite but allow blank cell overwrite

    Hi,

    Are you saying you basically want to lock cells once the have been filled in?

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    03-09-2011
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Prevent data cell overwrite but allow blank cell overwrite

    So to be more exact, in the sheet I have cells with data and I have blank cells.
    I want to drag and drop (D+D) cells with data to cells without data, but anytime I try to drag and drop cells with data to cells that already have data I want that to not be allowed. ie

    cell A1 = "anydata"
    cell A2 = blank
    cell A3 = "some other data"

    It should be OK to drag and drop the contents of A1 to A2 or A3 to A2, but not A1 to A3. (would be good to have a notification message to say something like"cell contains data - overwrite not allowed)
    Note after D+D A1 to A2, it would be OK to D+D A3 to A1.

    Thanks very much
    Last edited by Squasher; 03-09-2011 at 09:26 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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