+ Reply to Thread
Results 1 to 4 of 4

How to selectively lock few cells to prevent further editing of its content on data entry

  1. #1
    Registered User
    Join Date
    07-16-2010
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003
    Posts
    14

    How to selectively lock few cells to prevent further editing of its content on data entry

    Hi,
    I had posted this thread earlier in the general section. I am posting it here again as I feel this involves some degree of programming.

    I would like to know if its possible to selectively lock certain cells in a row based on entry of specific data in one cell?

    Example, I have data to be entered from Columns A to H,
    In Row 1, Col A= auto enters today's date and time (I use Now() function), the moment some data entry is made in Col B.
    Text or numeral data are entered in Col C - E.
    Upon entry of any data in Col E and moving out of that cell, I would like to have the cells from A - E of Row1 to be locked, but should keep Row 1 Col F-H and further open for additional data entry.

    I may enter data in Col F - H on some other day or even same day at a different time.

    In Row 1, Col H= again auto enters date and time using Now() function, the moment some data entry is made in Col G.
    Col F contains some drop down list data.
    Here again upon entry of data in Col G resulting in date entry in Col H; these cells should also get locked, allowing further data entry only in Row-2

    The problem I face while using Now() function is, when I open the file on some other date, all the dates changes to current date, which should not happen.

    Can this be done? If so I would appreciate if someone could help me in this regard.

    all help extended to this regard will be immensely appreciated.

    thanks in advance.
    Regards
    Daavis

  2. #2
    Registered User
    Join Date
    07-16-2010
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: How to selectively lock few cells to prevent further editing of its content on data en

    I have uploaded an xls file to provide further clarity to my posted query.
    Last edited by daavis; 06-27-2012 at 09:01 AM. Reason: Provided an attachement for better clarity to my query

  3. #3
    Registered User
    Join Date
    07-16-2010
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003
    Posts
    14

    Re: How to selectively lock few cells to prevent further editing of its content on data en

    Hi,
    Just modifying my previously posted query along with an .xls file attachment for your perusal.

    My need as per the attached file, is :

    In Col B-G (Yellow background), in Row 2, the moment data is populated in Col F, Col G gets auto filled (using Now() function); the cells and its data in Row 2 Col B to G should get locked and prevented from further unauthorized modification.

    Next, in Row 2, based on the selection from the drop down list in Col-H, Col I (If ColH = Completed) or Col J-L (if ColH=Outsourced)gets auto filled. Then Row 2 Col H to L data should also get locked and prevented from further unauthorised modification.

    If this sequence is possible, then I can extend the code to include Cols M to O.

    Can someone help me or suggest me how to go about it?

    Currently I am using Now() function and the problem is each time the file is opened, the date and time gets updated to the current date and time.

    I need this to monitor the status of the test requested for patients coming to our lab.

    Any help extended to this regard will be immensely appreciated.

    Regards
    Daavis.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-16-2010
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003
    Posts
    14

    Added some code that I tried to my post

    Just to add....
    I tried as suggested by jproffer at New to Excel Programming and looking for learning materials

    The first time i recorded macro as is on my sheet: sample register format, the VBA code generated were
    Please Login or Register  to view this content.
    the above code did not record anything that was entered using formula.

    then I tried on another sheet and tried filling entire details again manually, the code that it generated were
    Please Login or Register  to view this content.
    Beyond this I dont know how to proceed, how to make this happen automatically?
    Can anyone help me please?
    Regards
    Daavis
    IMPOSSIBLE is hidden 'I' a'M' 'POSSIBLE'

+ 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