+ Reply to Thread
Results 1 to 7 of 7

cell will only allow certain criteria

  1. #1
    Registered User
    Join Date
    08-24-2005
    Location
    Ireland
    MS-Off Ver
    O365
    Posts
    75

    cell will only allow certain criteria

    hello.

    can someone tell if its possible to set up cells so that when a person enters data in the cell that it will only let them enter the data if it matches certain criteria?
    for eg. i need to have an C before every number that is entered in a cell. can i set the cell up to give an error if a C is not entered in the cell?
    Last edited by oldchippy; 10-24-2008 at 12:58 PM.

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Thumbs up

    Quote Originally Posted by ghynes
    hello.

    can someone tell if its possible to set up cells so that when a person enters data in the cell that it will only let them enter the data if it matches certain criteria?
    for eg. i need to have an C before every number that is entered in a cell. can i set the cell up to give an error if a C is not entered in the cell?
    Hi ghynes,

    Select the cells where you want the data entered, then go to Data > Validation..., in the Allow box, pick "Custom", then in the formula box enter

    ="C"&"*" , if you want to put any messages to the other tabs you may, if not just click OK.

    Now when you pick one of the cell and type anything without C in front of it you will get an error message.

    Hope this helps you, let me know if you need more information

    oldchippy

  3. #3
    Registered User
    Join Date
    08-24-2005
    Location
    Ireland
    MS-Off Ver
    O365
    Posts
    75
    using the formula ="C"&"*" wont allow me write anything in the cell at all

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Exclamation

    Quote Originally Posted by ghynes
    using the formula ="C"&"*" wont allow me write anything in the cell at all
    Hi ghynes,

    I'm very sorry, you are right it doesn't work, must be going mad. I'll try and think of another way or maybe someone else knows - hopefully

    oldchippy

  5. #5
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Thumbs up

    Quote Originally Posted by ghynes
    using the formula ="C"&"*" wont allow me write anything in the cell at all
    OK, I may have the answer now in the formula box, type this

    =AND(LEFT(A1,1)="C",LEN(A1)>1)

    this will allow "C" or "c" to be entered followed by any number or letter, but the first letter must always be C

    Are we getting there?

    oldchippy

  6. #6
    Registered User
    Join Date
    08-24-2005
    Location
    Ireland
    MS-Off Ver
    O365
    Posts
    75
    yep. that did the job. thanks alot. legend

  7. #7
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Thanks for the feedback - glad to be of help

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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