+ Reply to Thread
Results 1 to 5 of 5

Mid function returning #value error

  1. #1
    Registered User
    Join Date
    06-28-2006
    Posts
    19

    Mid function returning #value error

    I have a column of numbers that I'm trying to do the "Mid" function on, and return the last digit but it' keeps returning the #VALUE! error

    It just happens in this this worksheet. When I create a new worksheet in the same workbook and create these numbers again, the formula works fine. I can even do a mid function, calling on the column of numbers from the original worksheet and it gives me a good answer. But using the mid function on this worksheet alone gives me the error.

    I have...

    -Made sure everything is in the number is in "Number" format

    -I've changed the number to letters and the mid function works fine on the original worksheet

    Any Ideas why this happens? Thanks for any input.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try adding +0 at the end of the mid function

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    06-28-2006
    Posts
    19
    Tried

    =MID(A1,1,1)+0

    and

    =MID((A1+0),1,1)

    Still returns "#Value!" error.


    FYI

    Cell A1 is equal to 10
    and
    cell A2 is equal to 15

    so when I enter "=A1+A2" it gives me 25

    (Just showing that these are actual numbers)

  4. #4
    Forum Contributor
    Join Date
    04-21-2007
    Location
    Lima, Peru
    MS-Off Ver
    2000, 2007, 2010
    Posts
    674

    Mid Function

    Hi

    If all you want is the last digit perhaps using the RIGHT function would work better, e.g.
    Please Login or Register  to view this content.
    regards


    Jeff

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Since you say the problem is isolated to a single sheet and works fine if recreated, I'd just recreate the whole sheet and move on.

    solnajeff is right about using RIGHT to get the last digit, whatever you decide.

+ 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