+ Reply to Thread
Results 1 to 6 of 6

Data Validation using OR Function

  1. #1
    Registered User
    Join Date
    08-31-2016
    Location
    ireland
    MS-Off Ver
    Office 365
    Posts
    2

    Data Validation using OR Function

    Hi,
    I am looking to use Data Validation checking for parts of one or two parts of text.

    In my data validation I Have:
    =RIGHT(A1,13)="thistext.text"

    which works, but I need to check for 2 different values so I tried:
    OR(=RIGHT(A1,13)="thistext.text", =RIGHT(A1,14)="othertext.text")

    However this won't work, it keeps giving the error.

    Is there anyway in which I can check the text in A1 contains either thistext.text or othertext.text?

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Data Validation using OR Function

    Welcome to the forum.

    You're nearly there - try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Valued Forum Contributor
    Join Date
    08-04-2011
    Location
    UK
    MS-Off Ver
    Excel 2021
    Posts
    346

    Re: Data Validation using OR Function

    syntax should looks like

    =OR(RIGHT(A1,13)="thistext.text", RIGHT(A1,14)="othertext.text")

  4. #4
    Registered User
    Join Date
    08-31-2016
    Location
    ireland
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Data Validation using OR Function

    That is perfect. I don't know why I was putting in the =RIGHT inside the OR, without = it works.

    Thank you.

  5. #5
    Registered User
    Join Date
    09-02-2013
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2013
    Posts
    44

    Re: Data Validation using OR Function

    As a formula it seems to work just fine?! It displays true/false to me. Maybe I didn't quite got what you wanted?
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Data Validation using OR Function

    You're welcome and thanks for the feedback.
    If that solves your question, please mark the thread as 'Solved' (instructions in my sig) to let others know that the answer's been found. Thank you.

+ 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] Data Validation IF function
    By rviji.cbe in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-27-2015, 09:17 PM
  2. [SOLVED] Data Validation with function
    By jnewby in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-30-2014, 02:32 PM
  3. Replies: 0
    Last Post: 10-03-2013, 02:02 AM
  4. Data Validation and IF function
    By Edexcel386 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-11-2011, 10:37 AM
  5. IF Function & Data Validation
    By oceans11 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2011, 11:51 PM
  6. Function in data validation that keeps user from entering duplicate data?
    By comptechbranden in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-26-2007, 05:31 AM
  7. Data Validation Function Help
    By John Jost in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-22-2005, 11:30 AM

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