+ Reply to Thread
Results 1 to 6 of 6

Blocking cells

  1. #1
    Registered User
    Join Date
    12-01-2006
    Posts
    99

    Blocking cells

    is this possible?

    you got 4 cells if one of the cell contains something u cant add anything in the other 3 cells, only when u delete the contain of the other cell.

    Example
    you got 4 cells A1, A2, A3 and A4
    Cell A3 contains 20 and when u try to fill in something in cell A4 it gives and error (and say something like delete the contain of cell A3...)

    can you do somthing like that?

  2. #2
    Forum Contributor
    Join Date
    08-19-2006
    Posts
    116
    Quote Originally Posted by Selo
    is this possible?

    you got 4 cells if one of the cell contains something u cant add anything in the other 3 cells, only when u delete the contain of the other cell.

    Example
    you got 4 cells A1, A2, A3 and A4
    Cell A3 contains 20 and when u try to fill in something in cell A4 it gives and error (and say something like delete the contain of cell A3...)

    can you do somthing like that?
    Hi

    Firstable,select A4.Open the data validation menu.In the first tab, i.e Settings, you have to define your validation criteria. Allow Whole Number/Data Different from/Source=A3=20 if we take your example. Then, if you try to type this number in A4, you'll have a message box.I don't know how to do with the range A1:A3.

  3. #3
    Registered User
    Join Date
    12-01-2006
    Posts
    99
    What i want is actually all the cells must be clear before putting in something in one of those cells so if someone writes somthing in cel a3 and a4 it needs to give an message like make sure the cell a1 to a4 is clear.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Does this help

    Right click sheet. Select view code and paste in the below

    Please Login or Register  to view this content.
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Validation should do it without VB.

    Set the Validation criteria for A1:A4 to the custom formula =(COUNTA($A1:$A4)=0)

    But all these solutions beg the question. How do you fill the second cell?
    Sure they're all empty when you fill the first cell, but it is never the case that they are all empty when it comes time to fill cell #2.

    perhaps that formula should be =NOT(COUNTA($A1:$A4)=4)

  6. #6
    Registered User
    Join Date
    12-01-2006
    Posts
    99
    I didn't get the validation to work

    but the VB work great

    Thank you all

+ 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