+ Reply to Thread
Results 1 to 3 of 3

Determine If Last Character is Number or Not A Number

  1. #1
    Registered User
    Join Date
    06-12-2008
    Location
    Newbury
    MS-Off Ver
    Office 365 ProPlus
    Posts
    92

    Determine If Last Character is Number or Not A Number

    Hey folks,

    I'm trying to determine if the last character of a cell is a number or not a number. So in a cell I may have a string like:

    ZXC123

    or

    ZXC123A

    If the last character is not a number I want the letter returned. So I thought I could use a formula like:

    =IF(NOT(ISNUMBER(RIGHT(D88,1))), RIGHT(D88,1),"")

    However for the string ZXC123 it still returns '3' so anyone have any ideas how I can do this?
    Last edited by chergh; 10-23-2008 at 10:43 AM.

  2. #2
    Registered User
    Join Date
    06-12-2008
    Location
    Newbury
    MS-Off Ver
    Office 365 ProPlus
    Posts
    92
    And I've just answered my own questions looking at a previous post.

    =IF(NOT(ISNUMBER(--RIGHT(D88,1))), RIGHT(D88,1),"")

    Seems to do the job.

  3. #3
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    The RIGHT function will return a string, so you need to convert it to numeric. Try this:

    =IF(NOT(ISNUMBER(VALUE(RIGHT(D88,1)))), RIGHT(D88,1),"")

    HTH

    Jason

    Looks like you answered your own question before I could!

+ 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