+ Reply to Thread
Results 1 to 24 of 24

=Value(text) returns an error

  1. #1
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    =Value(text) returns an error

    Dear all,

    I have copied some data (A1:E13) from internet for information.
    I am going to process E2:E13 which look like text, so I put a formula at F2=VALUE(E2) but error.
    I expect the results come out as in G2:G13, which carry a decimal when <10, and are integer when >10.

    ScreenHunter_041.jpg


    Thank you
    Attached Files Attached Files
    Last edited by kent97; 06-14-2016 at 04:04 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,905

    Re: =Value(text) returns an error

    Missed file ...

  3. #3
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: =Value(text) returns an error

    Quote Originally Posted by JohnTopley View Post
    Missed file ...
    Repost already

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,905

    Re: =Value(text) returns an error

    ..values in E have trailing character: remove these and you will get the numeric value.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,905

    Re: =Value(text) returns an error

    Use ..

    =VALUE(SUBSTITUTE(E2,CHAR(160),""))

  6. #6
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: =Value(text) returns an error

    Quote Originally Posted by JohnTopley View Post
    Use ..

    =VALUE(SUBSTITUTE(E2,CHAR(160),""))

    How about the decimal formatting?

  7. #7
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: =Value(text) returns an error

    Quote Originally Posted by JohnTopley View Post
    Use ..

    =VALUE(SUBSTITUTE(E2,CHAR(160),""))

    This formula still return error.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,905

    Re: =Value(text) returns an error

    Not on your posted file!

    If you don't want to "see" the decimal than format as number with zero decimal places. Or use

    =ROUND(VALUE(SUBSTITUTE(E2,CHAR(160),"")),0)
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: =Value(text) returns an error

    Try this one then

    =LEFT(E2,LEN(E2)-1)*1

    Assuming that that special character only appears at the very end. Meanwhile, I can't find that character anywhere from char(160) to char(255), I might run a macro just to find what char it is lol
    (copy pasta from Ford)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools

    Regards,
    Lem

  10. #10
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: =Value(text) returns an error

    Quote Originally Posted by Lemice View Post
    Try this one then

    =LEFT(E2,LEN(E2)-1)*1

    Assuming that that special character only appears at the very end. Meanwhile, I can't find that character anywhere from char(160) to char(255), I might run a macro just to find what char it is lol

    it works, thank you,
    how to set the decimal then?

  11. #11
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: =Value(text) returns an error

    The formula returns a number, you can format the entire column however you want (Ctrl 1 - Number)

    I still think JohnTopley's formula is much better universally, since it can eliminate that special character no matter where it is, and no matter how many it is in the string.
    But I still can't find its number in the ascii table ... Macro said it cannot be found ... Manually index match from Char(1) to Char(255) can't find it either ;w;

  12. #12
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: =Value(text) returns an error

    Quote Originally Posted by Lemice View Post
    The formula returns a number, you can format the entire column however you want (Ctrl 1 - Number)

    I still think JohnTopley's formula is much better universally, since it can eliminate that special character no matter where it is, and no matter how many it is in the string.
    But I still can't find its number in the ascii table ... Macro said it cannot be found ... Manually index match from Char(1) to Char(255) can't find it either ;w;
    But JohnTopley's formula just didn't work, you may test that formula by putting it on cell H2

  13. #13
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,179

    Re: =Value(text) returns an error

    Quote Originally Posted by kent97 View Post
    how to set the decimal then?
    Format Cells -> Custom -> [<10]0.0;[>10]0

  14. #14
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: =Value(text) returns an error

    I meant, when I can tell exactly what ascii number that character has in the table.
    inb4 it doesn't exist on the ascii table ...

    Anyway, let's hope that "trail" won't appear anywhere else beside at the end lol

  15. #15
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: =Value(text) returns an error

    Quote Originally Posted by Phuocam View Post
    Format Cells -> Custom -> [<10]0.0;[>10]0

    Yeah! It's exactly what I want.
    Thank you Phuocam

  16. #16
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: =Value(text) returns an error

    Quote Originally Posted by Lemice View Post
    I meant, when I can tell exactly what ascii number that character has in the table.
    inb4 it doesn't exist on the ascii table ...

    Anyway, let's hope that "trail" won't appear anywhere else beside at the end lol

    This =LEFT(E2,LEN(E2)-1)*1 already settled my problem. Thank you Lemice

  17. #17
    Forum Contributor
    Join Date
    07-24-2013
    Location
    HongKong
    MS-Off Ver
    Excel 2010
    Posts
    237

    Re: =Value(text) returns an error

    Quote Originally Posted by Lemice View Post
    I meant, when I can tell exactly what ascii number that character has in the table.
    inb4 it doesn't exist on the ascii table ...

    Anyway, let's hope that "trail" won't appear anywhere else beside at the end lol

    This =LEFT(E2,LEN(E2)-1)*1 already settled my problem, thank you Lemice

  18. #18
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,179

    Re: =Value(text) returns an error

    Quote Originally Posted by kent97 View Post
    Yeah! It's exactly what I want.
    Thank you Phuocam
    You are welcome!

  19. #19
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: =Value(text) returns an error

    Glad that I could help. Don't hesitate if you have any other questions / problems regarding this matter.

    I still cannot find that character, I'm mildly annoyed xd

  20. #20
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: =Value(text) returns an error

    ops double posted

  21. #21
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,905

    Re: =Value(text) returns an error

    So the file I posted in #8 was wrong ???????

  22. #22
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: =Value(text) returns an error

    Quote Originally Posted by JohnTopley View Post
    So the file I posted in #8 was wrong ???????
    For some reason, when I download your file and open it in my computer, as soon as I open it, Excel recalculates everything and returns #VALUE! on all of your formula

  23. #23
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,905

    Re: =Value(text) returns an error

    I have just downloaded it from my post and it is OK!!!

  24. #24
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: =Value(text) returns an error

    Are you sure you F9 / Ctrl = after you downloaded it It doesn't work on my computer, for the 5th times xd

    "This file is from da internet, do you wanna edit it?"
    "Yes"
    "Well damn, here are #VALUE!, have fun!"

    I cri

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] finds certain text in a column and returns specified text into a cell
    By jcambell in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 07-30-2015, 03:35 PM
  2. [SOLVED] Application.Match returns Error 2042 whene text absolutely does exist?
    By Rhudi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2013, 04:21 PM
  3. How to error trap a vlookup that returns an error or #N/A
    By kjy1989 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2013, 12:01 PM
  4. [SOLVED] IF - returns name error
    By Alan Davies in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-09-2006, 04:25 AM
  5. [SOLVED] SUM returns #VALUE! error
    By kjs in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-02-2006, 10:55 AM
  6. [SOLVED] UDF returns #NAME? error
    By mikebres in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-09-2005, 06:45 PM
  7. RATE returns the #NUM! error value
    By JC in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-09-2005, 08:06 PM

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