+ Reply to Thread
Results 1 to 6 of 6

How to allow Numbers to be added but not any text

  1. #1
    Registered User
    Join Date
    11-10-2012
    Location
    London
    MS-Off Ver
    Microsoft Office 2010
    Posts
    18

    How to allow Numbers to be added but not any text

    Hi, i go into data validation and click on the custom setting then i enter this:

    =IF(K10="Metric", 14<G12, IF(K10="Imperial", 30<G12))

    So only the correct minimum number can be typed in, if K10 is Metric or Imperial. If its anything lower then what it should a stop message appers.

    I went to test this and it works perfectly but i then discovered another problem, it allows me to enter text too.

    Is there a way to stop text from being entered and only numbers higher then 30 if K10 is imperial or higher then 14 if K10 is metric? Please tell me what to do!

    Please help!

    Many thanks in advance!
    Last edited by NameUse; 11-17-2012 at 12:27 PM.

  2. #2
    Forum Contributor dogberry's Avatar
    Join Date
    07-15-2012
    Location
    Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    624

    Re: Add numbers but no text?

    Hi

    Data validation whole number should do the trick

    Chris
    Click my star if I helped Thanks

  3. #3
    Registered User
    Join Date
    11-10-2012
    Location
    London
    MS-Off Ver
    Microsoft Office 2010
    Posts
    18

    Re: Add numbers but no text?

    What should i do then? Do you know?

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Add numbers but no text?

    hi NameUse, try:
    =AND(IF(K10="Metric",G12>14,IF(K10="Imperial",G12>30)),ISNUMBER(G12))

    if your results in K10 can only be either of them, it can be further shorten to:
    =AND(IF(K10="Metric",G12>14,G12>30),ISNUMBER(G12))

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  5. #5
    Forum Contributor dogberry's Avatar
    Join Date
    07-15-2012
    Location
    Wales, UK
    MS-Off Ver
    Excel 2010
    Posts
    624

    Re: Add numbers but no text?

    Hi

    Yes when you did your data validation it gives you the opportunity to select cell input change it from default to whole number and that should stop text being entered if you are unsure can you post a sample worksheet and either myself or someone else will have a look and see if we can rectify the situation for you.

    Chris

  6. #6
    Registered User
    Join Date
    11-10-2012
    Location
    London
    MS-Off Ver
    Microsoft Office 2010
    Posts
    18

    Re: How to allow Numbers to be added but not any text

    Thanks for your help benshiryo! It works!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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