+ Reply to Thread
Results 1 to 8 of 8

Data validation forula for date value to be greater than other cell OR specific text

  1. #1
    Registered User
    Join Date
    07-25-2014
    Location
    London
    MS-Off Ver
    2010
    Posts
    3

    Data validation forula for date value to be greater than other cell OR specific text

    Hi there,

    I'm trying to create a DV rule that will allow a cell to take a value that is either a date greater than the preceding cell OR a specific text string. (the word 'Trainer')

    I'm currently toying with this formula =OR(K112>J112,K112="Trainer") but it doesn't prevent me from entering words other than 'Trainer'. Any help on how to resolve this would be greatly appreciated.

    Thanks!

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Data validation forula for date value to be greater than other cell OR specific text

    I think the formula is resulting in TRUE if K112 contains ANY text, in which case it could well be greater than J112.
    e.g.
    J112 = blank
    K112 = "ABC"

    K112 IS greater than J112 which is not what you want.

    Am still playing with this...
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Data validation forula for date value to be greater than other cell OR specific text

    Try this

    =OR(AND(ISNUMBER(J112),ISNUMBER(K112),K112>J112),K112="Trainer")

    The greater than condition now only gets executed if J112 and K112 are both numeric.

  4. #4
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Data validation forula for date value to be greater than other cell OR specific text

    Try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Please add reputation by clicking on the * if I have helped.
    Please mark the thread SOLVED if your issue has been resolved.
    Thanks, Glenn.

  5. #5
    Registered User
    Join Date
    07-25-2014
    Location
    London
    MS-Off Ver
    2010
    Posts
    3

    Re: Data validation forula for date value to be greater than other cell OR specific text

    Brilliant, both solutions worked for this (although I can see the advantage of requiring both J and K cells to be values) so thank you both very much for the help!

  6. #6
    Registered User
    Join Date
    07-25-2014
    Location
    London
    MS-Off Ver
    2010
    Posts
    3

    Re: Data validation forula for date value to be greater than other cell OR specific text

    Apologies, I didn't test properly - still not working properly as now can't enter anything in K cells without an error. I have attached a redacted version of the sheet in question in case this is of any help - if you have any more suggestions this would be fantastic.

    Cell references tat I previously mentioned are accurate and all forumlae visible. Hopefully you will see what I'm trying to achieve!

    thanks again

    Training Matrix Sandbox Version.xlsm

  7. #7
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Data validation forula for date value to be greater than other cell OR specific text

    I can see a couple of issues. Firstly, the data validation formula in cell K17 references row 127, not 17. Secondly, you initially asked to validate that column K was greater than column J, but your data shows them as equal in every instance. If that is valid data you would need to change the data validation formula in K2 to this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    I used Special-K's formula as you said you preferred it.

  8. #8
    Registered User
    Join Date
    03-06-2017
    Location
    Waterford, Ontario, Canada
    MS-Off Ver
    Excel 2010, Excel 2013, Excel 2016
    Posts
    1

    Re: Data validation forula for date value to be greater than other cell OR specific text

    Thank you for the help.

+ 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. [SOLVED] Formula to highlight cell/data greater than a specific date
    By tdsmith14 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-22-2013, 05:44 AM
  2. [SOLVED] Data validation based on another cell containing specific text
    By Sph01 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-06-2013, 05:51 AM
  3. Replies: 1
    Last Post: 01-25-2013, 04:59 PM
  4. Excel 2007 : Forula for If then/ date calculation
    By mlczarn in forum Excel General
    Replies: 1
    Last Post: 03-15-2012, 05:30 PM
  5. [SOLVED] Calculate # of Occurrences In Cell Range Greater Than Specific Date
    By MLCall in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-17-2012, 01:05 PM

Tags for this Thread

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