+ Reply to Thread
Results 1 to 8 of 8

Limit data entry in a series of cells if one cell has data entered.

  1. #1
    Forum Contributor
    Join Date
    01-06-2004
    Posts
    121

    Limit data entry in a series of cells if one cell has data entered.

    I have 3 cells. If I enter data in any one of the cells, I want the other two cells to be locked out (IE, no data can be entered).

    How can I do this?

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,914

    Re: Limit data entry in a series of cells if one cell has data entered.

    What are the three cells?

  3. #3
    Forum Contributor
    Join Date
    01-06-2004
    Posts
    121

    Re: Limit data entry in a series of cells if one cell has data entered.

    B14, c14, d14

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,914

    Re: Limit data entry in a series of cells if one cell has data entered.

    First make sure that the three cells are unlocked. Then protect the worksheet. The copy and paste the macro below into the worksheet code module.
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-06-2004
    Posts
    121

    Re: Limit data entry in a series of cells if one cell has data entered.

    Sweet! Thanks a ton!

  6. #6
    Forum Contributor
    Join Date
    01-06-2004
    Posts
    121

    Re: Limit data entry in a series of cells if one cell has data entered.

    Oops. I'm actually trying to help a co-worker and he just told me that it will need to apply to only certain worksheets and also will need to apply to rows 14 - 44

    Can you just give me the general format for that and I can amend it as needed? Thanks again!

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,914

    Re: Limit data entry in a series of cells if one cell has data entered.

    You will have to loop through the appropriate worksheets and activate them one at a time. Then on each worksheet you will have to loop through rows 14 to 44 assigning a variable to the row number in the target address. You will also need to change the Intersect range to B14:D44. It may be a little tricky.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,972

    Re: Limit data entry in a series of cells if one cell has data entered.

    You can do this with Data Validation, you dont need VBA

    Highlight the range you want, select DV from the DATA tab, select Custom, enter =COUNTA($E1:$G1)<2
    Uncheck "ignore blanks"

    Adjust ranges as needed
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. User Form Data entry trying to check that Data is entered right
    By CityMPLSEmpolyee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-06-2012, 01:23 PM
  2. Limit data entry with Data valitadtion based on date
    By Phraedrique in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 01-25-2012, 12:31 AM
  3. Requiring Data Entry in Cell B (et al) when Data has been entered in Cell A.
    By Ice Burn in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-21-2010, 09:17 AM
  4. How do I limit data entry in cells to Y or N
    By Paul Sheppard in forum Excel General
    Replies: 3
    Last Post: 02-26-2009, 03:33 PM
  5. ?-Change data series range as data is entered?
    By isofuncurves in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 01-24-2006, 02:15 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