+ Reply to Thread
Results 1 to 4 of 4

Function of function of cell reference in data validation.

  1. #1
    Registered User
    Join Date
    11-09-2018
    Location
    Germany
    MS-Off Ver
    Office 2016
    Posts
    2

    Function of function of cell reference in data validation.

    Hello guys,

    can you give me a hint how to do this? I want to define a macro that creates data validation for cell U2 like this (locale is German):


    Please Login or Register  to view this content.
    It throws an error because it cannot deal with

    Please Login or Register  to view this content.
    .

    What I am actually trying to do is the following. Cell U2 contains a fiscal year of the format YY/YY, like 18/19, or 19/20, etc. I want to ensure that the first number is 1 smaller than the second, so I tried this


    Please Login or Register  to view this content.
    Whats the mistake I am doing?


    Many thanks for any suggestions.

    Borkar

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Function of function of cell reference in data validation.

    You can test that the first number is smaller with

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


    When using an Excel function in VBA code you should precede it with the

    Please Login or Register  to view this content.
    syntax. And don't forget if the formula contains literal quotes then these need to be wrapped in a second set of "" quote marks.

    So, (untested)

    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Function of function of cell reference in data validation.

    For data validation in VBA, the formula must be entered exactly as you would enter it in a cell, not in US formats. So if you normally use a semicolon and german function names for example, you must use those in the code too.
    Rory

  4. #4
    Registered User
    Join Date
    11-09-2018
    Location
    Germany
    MS-Off Ver
    Office 2016
    Posts
    2

    Re: Function of function of cell reference in data validation.

    Thanks, I got it now!

    I would like to thank you in particular for the quick replies! :-)

+ 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] IF function with INDIRECT reference for Data Validation source causing issue
    By FF6 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-25-2017, 12:41 PM
  2. Replies: 1
    Last Post: 02-15-2017, 12:49 AM
  3. Indirect Sheet reference with cell reference left function and text
    By teststrip in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-01-2015, 10:31 AM
  4. Offset function with reference cell equal to the value of match function
    By cmurda in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-08-2014, 02:09 PM
  5. Filtering Data with a function or cell reference
    By DataJunkie in forum Excel General
    Replies: 1
    Last Post: 11-08-2010, 12:06 PM
  6. Replies: 2
    Last Post: 03-20-2009, 01:29 PM
  7. [SOLVED] IF Function - If the reference cell data is presently unknown
    By Amy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-06-2005, 07:06 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