+ Reply to Thread
Results 1 to 5 of 5

Help with failing Data Validation formula

  1. #1
    Registered User
    Join Date
    12-22-2020
    Location
    Mount Vernon, Ohio, USA
    MS-Off Ver
    Office 365 Click-to-Run (Subscription)
    Posts
    2

    Angry Help with failing Data Validation formula

    I have a data validation formula that works perfectly when tested in a cell at the spreadsheet level BUT fails to work when used as validation for column "X".

    =IF(OR(TRUNC(X389*100,7)-TRUNC(INT(X389*100),7)<>0,AND(U389<>"",U389<>X389)),0,1)

    U389 = Budgeted_Amount
    X389 = Actual_Amount

    The purpose is to 1) check the entry in "X" for fractional cents and fail if found and 2) to see if there is a budget amount in "U" and if so does the actual in "X" match.

    The formula works fine till I insert it as a formula for validation for "X".

    I can not send the Workbook as it is very large.

    It fails to correctly identify fractional cents in "X" ($12.999) when the budget "U" is a null.


    Thanks,

    TheOldPuterMan

  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
    52,933

    Re: Help with failing Data Validation formula

    2 suggestions...
    1. Try it without the IF statement (shouldnt really make a difference , but the IF statement is redundant, DV tests for TRUE (1) or FALSE (0) so you dont need to add them
    2. Try each part on it's own and see if either 1 fails your test - that may tell you where the fault lies.
    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
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Help with failing Data Validation formula

    OR(cell 1, cell 2) gives single "TRUE" or "FALSE"

    OR(range 1, range 2) gives single "TRUE" or "FALSE" too, not range of TRUE or FALSE

    I'd suggest SUMPRODUCT function.

    Try to post may be a few rows/columns of sample, not all.
    Quang PT

  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
    52,933

    Re: Help with failing Data Validation formula

    Quote Originally Posted by bebo021999 View Post
    OR(range 1, range 2) gives single "TRUE" or "FALSE" too, not range of TRUE or FALSE
    Maybe im missing something because it's late and Im tired lol, but I saw no reference to a range in the OR()?

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Help with failing Data Validation formula

    Quote Originally Posted by FDibbins View Post
    Maybe im missing something because it's late and Im tired lol, but I saw no reference to a range in the OR()?
    I read "fails to work when used as validation for column "X" "
    and guessing ?

+ 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] Trying and failing to pivot data, dynamic formula?
    By And180y in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-24-2020, 01:04 AM
  2. [SOLVED] Array formula failing
    By BRISBANEBOB in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-12-2016, 06:29 PM
  3. [SOLVED] Formula failing only when nested
    By mwatson2 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-31-2015, 05:59 PM
  4. Trying to update formula in cell is failing
    By michaeltwc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-11-2014, 04:13 PM
  5. Vlookup failing when value is a formula
    By Opy in forum Excel General
    Replies: 3
    Last Post: 08-31-2011, 09:53 PM
  6. Number failing ISNUMBER validation
    By Phosphonothioic in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-11-2011, 10:45 PM
  7. add method of validation failing
    By mark kubicki in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2005, 04:06 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