+ Reply to Thread
Results 1 to 6 of 6

Excel won't recognize cell value as a number

  1. #1
    Registered User
    Join Date
    01-22-2013
    Location
    Lubumbashi, RDC
    MS-Off Ver
    Excel 2010 (mac)
    Posts
    29

    Excel won't recognize cell value as a number

    Hi everyone,

    I have a column of numbers as a result of a formula (=SI(ESTNUM(P4);P4;DROITE(P4;NBCAR(P4)-1))) and before that, P4 is a result of the VLOOKUP formula. Now I want to compare this result (numeric value) with another cell (numeric value) but excel doesn't recognize these cell as numbers. When I try to compare the cells (A1=A2 e.g.), he says #VALUE. I have already tried formatting the cell format to 'number' and I have also tried the VALUE function but that doesn't work either..

    Your help/advice would be greatly appreciated!

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Excel won't recognize cell value as a number

    The result of RIGHT function (DROITE) is always text - try adding 0 to force to numeric e.g.

    =SI(ESTNUM(P4+0);P4+0;DROITE(P4;NBCAR(P4)-1)+0)
    Audere est facere

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    How did you use VALUE?
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    01-22-2013
    Location
    Lubumbashi, RDC
    MS-Off Ver
    Excel 2010 (mac)
    Posts
    29

    Re: Excel won't recognize cell value as a number

    Daddylonglegs, this formula works except for some cells which then also shows #VALUE. I added the excel file so it is clear.
    Attached Files Attached Files

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Excel won't recognize cell value as a number

    There's a strange character (ASCII code 29) at the end of each string where you are getting !VALUE#.

    You can remove it by using CLEAN in either the formula in column H, or perhaps a little easier in the VLOOKUP in column G.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    01-22-2013
    Location
    Lubumbashi, RDC
    MS-Off Ver
    Excel 2010 (mac)
    Posts
    29

    Re: Excel won't recognize cell value as a number

    @Norie: That works!

    Thank you so much for you help Norie and Daddylonglegs!

+ 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