+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : Date validation to give error when nothing is filled in

  1. #1
    Forum Contributor
    Join Date
    05-19-2009
    Location
    Santiago, Chile
    MS-Off Ver
    Excel 2019
    Posts
    212

    Date validation to give error when nothing is filled in

    I created a formula that gives me a 0 (=0) in a cell and I want to create a Data Validation that gives me error message when somebody wants to delete the information to leave the cell blank. Can change the info in the cell as much you want but can never leave it empty.
    I tried with =B2="" but doesn't work

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Date validation to give error when nothing is filled in

    Try
    Allow:= Custom
    Please Login or Register  to view this content.
    Uncheck the "Ignore blank" checkbox.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Forum Contributor
    Join Date
    05-19-2009
    Location
    Santiago, Chile
    MS-Off Ver
    Excel 2019
    Posts
    212

    Re: Date validation to give error when nothing is filled in

    Quote Originally Posted by Marcol View Post
    Try
    Allow:= Custom
    Please Login or Register  to view this content.
    Uncheck the "Ignore blank" checkbox.
    No, this doesn't work

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Date validation to give error when nothing is filled in

    Hmm? This is more difficult than I thought.
    Whatever validation I tried it fails if the contents of the cell are deleted.
    if a string of spaces is entered they are accepted.

    It seems that VBa in the sheet module is the only sure way, perhaps someone else knows better.

    See this workbook.
    Attached Files Attached Files
    Last edited by Marcol; 12-26-2011 at 01:50 AM.

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Date validation to give error when nothing is filled in

    There are serious errors on this Forum.

    Attachments are extremely prone to failure and replies are not being recognised on the "Todays' Posts" page.

  6. #6
    Forum Contributor
    Join Date
    05-19-2009
    Location
    Santiago, Chile
    MS-Off Ver
    Excel 2019
    Posts
    212

    Re: Date validation to give error when nothing is filled in

    Thanks but I am trying to avoid VBa because experience many troubles on other machines that are sharing the same file with me. On my PC all is fine but the others have all trouble. I don't know if it is realted that they are using Excel 2010 while I 2007 or is it related that VB are not compatible on network, I am not sure but prefer to avoid it.
    Any help from somebody else will be more than welcome.
    Thanks Marcol for the effort.

  7. #7
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Date validation to give error when nothing is filled in

    Try Data>Data Validation>Allow:Custom>Formula:

    =NOT(ISBLANK(B2))

    and uncheck "Ignore blank"

  8. #8
    Forum Contributor
    Join Date
    05-19-2009
    Location
    Santiago, Chile
    MS-Off Ver
    Excel 2019
    Posts
    212

    Re: Date validation to give error when nothing is filled in

    Quote Originally Posted by dangelor View Post
    Try Data>Data Validation>Allow:Custom>Formula:

    =NOT(ISBLANK(B2))

    and uncheck "Ignore blank"
    Neither this is working. I tried with check "Ignore blank" without but nothing is doing it. The formula I have tranlated in spanish as =NO(ESBLANCO(B2)) according to the site http://drop.by/excel-translator.php

  9. #9
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Date validation to give error when nothing is filled in

    Custom formula, =LEN($B$2)>0
    Ignore Blanks unchecked.
    Also ensure the Error Alert message is checked.

    This will only work if the user edits the cell contents. If they simply delete or clear the cells contents no message will appear. That will require code.
    Cheers
    Andy
    www.andypope.info

+ 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