+ Reply to Thread
Results 1 to 6 of 6

MsgBox if data entered in range is not numeric

  1. #1
    Registered User
    Join Date
    06-28-2011
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2010, Excel 2011 for mac
    Posts
    82

    MsgBox if data entered in range is not numeric

    Hi,

    I would like to have a Msgbox appearing if the user enters data that is not numeric.

    This should only apply for cells K2:K40

    Any help is much appreciated,
    Kbka

  2. #2
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2003/2007
    Posts
    182

    Re: MsgBox if data entered in range is not numeric

    Hi,

    Select the range, then goto the Data validation.
    Select Decimal option and choose max and min range for the numeric values.
    Then goto to Input Message tab and put the Title and Error message you want to display and finally click OK.

    Hope it will help you.

    Regards
    taps

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: MsgBox if data entered in range is not numeric

    You can use Data Validation for that.

    Select cells K2 to K40. Then, on the Data Ribbon, choose Data Validation. Choose Whole Number or Decimal and choose what limits you want.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2003/2007
    Posts
    182

    Re: MsgBox if data entered in range is not numeric

    Hi,

    You can also use below codes in a Command button to check the data type.

    Please Login or Register  to view this content.
    Regards
    taps

  5. #5
    Registered User
    Join Date
    06-28-2011
    Location
    Copenhagen, Denmark
    MS-Off Ver
    Excel 2010, Excel 2011 for mac
    Posts
    82

    Re: MsgBox if data entered in range is not numeric

    Great! Exactly what i need!

    Regards,
    Kbka

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,434

    Re: MsgBox if data entered in range is not numeric

    You're welcome. Thanks for the rep.


    If you want to use code, you could use a Worksheet Change event monitoring cells K2 to K40.


    Regards, TMS

+ 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