+ Reply to Thread
Results 1 to 4 of 4

Set specififc format for cell

  1. #1
    Registered User
    Join Date
    08-10-2020
    Location
    Riyadh
    MS-Off Ver
    MS Office 365 Apps for Bussiness (Windows 10 64 Bit)
    Posts
    68

    Set specififc format for cell

    i have a power query file where random people enter data and then it comes to me but people entering data in wrong format for example there is field called plate number (see picture) is a correct format, I want to set specific format for this range so when anyone enter plate no in wrong format it will stop them thanks.




    format.jpg

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

    Re: Set specififc format for cell

    If the format is "XXX 0000" with three letters + blank + four digits
    Use cell B2 to check
    =IF(AND(AND(NOT(ISNUMBER(MID(A2,{1,2,3},1)+0))),MID(A2,4,1)=" ",ISNUMBER(RIGHT(A2,4)+0)),"OK","wrong")
    Quang PT

  3. #3
    Registered User
    Join Date
    08-10-2020
    Location
    Riyadh
    MS-Off Ver
    MS Office 365 Apps for Bussiness (Windows 10 64 Bit)
    Posts
    68

    Re: Set specififc format for cell

    Quote Originally Posted by bebo021999 View Post
    If the format is "XXX 0000" with three letters + blank + four digits
    Use cell B2 to check
    =IF(AND(AND(NOT(ISNUMBER(MID(A2,{1,2,3},1)+0))),MID(A2,4,1)=" ",ISNUMBER(RIGHT(A2,4)+0)),"OK","wrong")
    I don't want to check it. i want to stop people from entering data in wrong format. is there any way we can do it through format cells option.


    Thanks

  4. #4
    Registered User
    Join Date
    08-10-2020
    Location
    Riyadh
    MS-Off Ver
    MS Office 365 Apps for Bussiness (Windows 10 64 Bit)
    Posts
    68

    Re: Set specififc format for cell

    I find the solution myself,
    1-You to create al list of all plate numbers in sheet 2,
    2-Then go to sheet 1 and & select whole column except header
    3-Select data validation > List
    4-IN source box, select the list of plate numbers from sheet2
    5-uncheck drop down feaur & press ok. thats it
    Now if anyone type wrong plate number or in wrong format, ir will give them errior.


    thanks all

+ 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. Macro should send the content of a file to specififc set of people on click of a button
    By aparnawangu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-13-2018, 11:45 AM
  2. Replies: 4
    Last Post: 10-05-2017, 09:37 AM
  3. Replies: 4
    Last Post: 03-13-2015, 02:32 AM
  4. Replies: 3
    Last Post: 02-24-2015, 02:58 AM
  5. Replies: 1
    Last Post: 07-03-2014, 06:33 AM
  6. Replies: 1
    Last Post: 04-18-2012, 11:18 AM
  7. Replies: 1
    Last Post: 06-27-2005, 06:05 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