+ Reply to Thread
Results 1 to 29 of 29

data validation formula

  1. #1
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    data validation formula

    Hello,
    I tried the formula for data validation:

    = O (ISNUMBER (FIND ($ B $ 1: $ B $ 11; A1))) = FALSE

    with * .xls works well.
    In excel *.xlsx or .*xlsm does not work perfectly, in each cell is inserted where the data validation functions are inserted to be done:
    select cell> validated> o.k. and then it works.
    When you restart the workbook does not work and must repeat the operation select> o.k.
    Where am I wrong?
    I hope my English is understandable.
    max_max
    Attached Files Attached Files

  2. #2
    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
    53,048

    Re: data validation formula

    Try this instead...
    =COUNTIFS($J$13:$J$20,C4)>0

    DV (and CF_) work only on TRUE/FALSE (1/0) so you just need a formula that returns that
    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

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: data validation formula

    or
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    bad idea
    Last edited by sandy666; 02-15-2017 at 03:08 PM.

  4. #4
    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
    53,048

    Re: data validation formula

    hahaha Sandy, love that last comment

  5. #5
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: data validation formula

    The fdiddins formula does not work well
    The sandy666 formula works well

    A change for sandy666:
    if it so works (1 character)

    *
    /
    ?

    if it does not work more than one character:

    **
    / PPP
    ??? YYY

    max_max

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: data validation formula

    my formula doesn't work well becuse you can use <, >
    and yes, it search first character and block, the rest is ignored

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: data validation formula

    @Ford,
    Sometimes I am too fast. Shame on me

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: data validation formula

    These two characters: ? and * are problematic because both represent every character so if I will lock these two I will lock all characters from the keyboard.
    But if you don't care about the two above you can use:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    You can add a few characters here "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" like comma or dot... etc.
    Check by yourself
    Last edited by sandy666; 02-15-2017 at 03:58 PM.

  9. #9
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: data validation formula

    O.k. sandy
    but why this formula:
    =OR(ISNUMBER(FIND($J$13:$J$20,F15)))=FALSE
    It works well with *.xls
    but not with * .xlsx / *. xlsm
    max_max

  10. #10
    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
    53,048

    Re: data validation formula

    Quote Originally Posted by max_max View Post
    The fdiddins formula does not work well
    What doesnt work? explain please

  11. #11
    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
    53,048

    Re: data validation formula

    Quote Originally Posted by max_max View Post
    O.k. sandy
    but why this formula:
    =OR(ISNUMBER(FIND($J$13:$J$20,F15)))=FALSE
    It works well with *.xls
    but not with * .xlsx / *. xlsm
    max_max
    I see no reason what that would work in earlier versions of excel but not in later versions.

    Also, perhaps you missed where I said
    DV (and CF_) work only on TRUE/FALSE (1/0) so you just need a formula that returns that
    so you dont need to specify = FALSE, just structure your formula to return that as an answer

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: data validation formula

    Quote Originally Posted by max_max View Post
    O.k. sandy
    but why this formula:
    =OR(ISNUMBER(FIND($J$13:$J$20,F15)))=FALSE
    It works well with *.xls
    but not with * .xlsx / *. xlsm
    max_max
    Sorry, I don't know because I don't have Ex2003 or earlier (this is like dinosaur )

  13. #13
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: data validation formula

    the fdibbins formula does not work
    the sandy66 formula works only with one character
    my formula works only with * .xls
    Attached Files Attached Files

  14. #14
    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
    53,048

    Re: data validation formula

    Quote Originally Posted by max_max View Post
    the fdibbins formula does not work
    the sandy66 formula works only with one character
    my formula works only with * .xls
    Hard to fix something when you are not told what it is doing wrong.

    "doesnt work" tells me nothing. Is it giving wring result? no result? something else?
    explain

  15. #15
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: data validation formula

    the formula does not read all the characters in J13:J20

  16. #16
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: data validation formula

    Use formula from #8 It will work with first or any next places, like abc\ or qazx< except like I said before: * and ?
    Did you read #8 post?

    I have no idea for more. You can look for VBA solution.
    Last edited by sandy666; 02-15-2017 at 04:41 PM.

  17. #17
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: data validation formula

    @Ford,
    Don't you think in your post #2 should be =COUNTIF($J$13:$J$20,K13)<1 ?

  18. #18
    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
    53,048

    Re: data validation formula

    Sandy, no, it is testing for the presence of the character, so it needs to be >0. However, with that last file, I see that the character may be part of a string, so that wont work anyway

  19. #19
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: data validation formula

    Ok, I tested a few different method but no luck. If I lock ? and * I can't lock < and > ( tilde before <,> doesn't work also)
    Thanks for answer

  20. #20
    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
    53,048

    Re: data validation formula

    Try this instead...
    =COUNTIFS($J$13:$J$20,"*"&C4&"*")>0

  21. #21
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: data validation formula

    The new FDibbins formula works with more than one character in the cell
    with one character does not work.
    max_max

  22. #22
    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
    53,048

    Re: data validation formula

    hmm can you upload a sample file showing that?

    I just tested it on all the characters in your list, and it tested TRUE for each 1.

  23. #23
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: data validation formula

    attached
    max_max
    Attached Files Attached Files

  24. #24
    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
    53,048

    Re: data validation formula

    ooops you wanted to NOT allow those characters, correct?

    =COUNTIFS($J$13:$J$20,"*"&C4&"*")=0

  25. #25
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: data validation formula

    Ford,
    Try with abc< or ab??cd

  26. #26
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: data validation formula

    Hello fdibbins,
    your formula works only with one character
    with more than 1 character does not work.

    =CONTA.PIŁ.SE($J$13:$J$20;"*"&C4&"*")=0
    =COUNTIFS($J$13:$J$20,"*"&C4&"*")=0

    max_max

  27. #27
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,824

    Re: data validation formula

    Try this

    =ISNUMBER(SUMPRODUCT(SEARCH(MID(SUBSTITUTE(SUBSTITUTE(C14,"*","|"),"?","|"),ROW(INDIRECT("1:"&LEN(C14))),1),"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")))

  28. #28
    Registered User
    Join Date
    07-08-2016
    Location
    USA
    MS-Off Ver
    Office 365, Office 2016 for PC & Mac, Office 2013, Office 2011 Mac
    Posts
    80

    Re: data validation formula

    Try:

    Please Login or Register  to view this content.
    C13: Data validation cell

    DMG

  29. #29
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: data validation formula

    Hello dmg2016,
    I think it's right.
    Here at my house works well, monday in my office try the new data validation.
    Your formula in italian is:

    =MATR.SOMMA.PRODOTTO(LUNGHEZZA(C13)-LUNGHEZZA(SOSTITUISCI(C13;$J$13:$J$20;"")))=0

    Thanks so much.
    Hello everybody.
    max_max

+ 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. Replies: 7
    Last Post: 02-12-2016, 01:54 PM
  2. Need formula to pull data based off a data validation (please help!!)
    By Thanks4helping in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-20-2014, 11:08 PM
  3. Replies: 4
    Last Post: 07-18-2014, 11:48 AM
  4. [SOLVED] How to use INDEX formula in conjunction with Data Validation to output data.
    By Pope_003 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-09-2014, 11:08 AM
  5. [SOLVED] Formula to display data validation results on another sheet based on data chosen?
    By myoung5149 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-16-2013, 02:53 PM
  6. Need to shorten Data Validation formula in order to fit into formula field
    By V57strat in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-27-2012, 05:31 PM
  7. [SOLVED] Need Data Validation or Formula to Force Entry of Data in .25 Increments
    By sstravs in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-11-2012, 07:16 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