+ Reply to Thread
Results 1 to 6 of 6

Stop user from entering text before or after space in data validation

  1. #1
    Registered User
    Join Date
    04-30-2015
    Location
    Brisbane
    MS-Off Ver
    2013
    Posts
    11

    Stop user from entering text before or after space in data validation

    Hi all,

    I wanna stop user from entering space before or after text in data validation

    Dan
    Last edited by dan66656; 05-07-2015 at 07:18 AM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: Stop user from entering text before or after space in data validation

    Hi there. try this in the DV

    =NOT(OR(LEFT(A1,1)=" ", RIGHT(A1,1)=" "))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    03-11-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    379

    Re: Stop user from entering text before or after space in data validation

    Hi Dan,

    Adding to Glenn's formula

    You can use TRIM function also

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


    Regards,
    AM

  4. #4
    Forum Contributor
    Join Date
    03-11-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    379

    Re: Stop user from entering text before or after space in data validation

    @ Glenn: Thanks for the rep

    @Dan: If you got the resolution then please mark the thread as SOLVED.

    Also click on Add rep who has helped you.

    Regards,
    AM

  5. #5
    Registered User
    Join Date
    04-30-2015
    Location
    Brisbane
    MS-Off Ver
    2013
    Posts
    11

    Re: Stop user from entering text before or after space in data validation

    Thanks Glenn & AM

    Dan

  6. #6
    Forum Contributor
    Join Date
    03-11-2014
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    379

    Re: Stop user from entering text before or after space in data validation

    thanks Dan for the rep

+ 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. Data Validation between text boxes on user form
    By batmom2 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-05-2015, 03:33 PM
  2. Replies: 4
    Last Post: 08-01-2013, 09:56 AM
  3. Replies: 3
    Last Post: 04-03-2009, 10:31 AM
  4. 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
  5. How do you Stop Entering Duplicate Data in a Column?
    By Satraj in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-04-2005, 09:10 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