+ Reply to Thread
Results 1 to 3 of 3

Using =VALUE() but getting #VALUE for text

Hybrid View

  1. #1
    Registered User
    Join Date
    12-05-2013
    Location
    Glasgow
    MS-Off Ver
    Excel 2010
    Posts
    12

    Using =VALUE() but getting #VALUE for text

    Hi

    I have a SQL Report which exports data from our accounts system in to Excel and one of the columns shows both numbers and text, however the format of this column is such that it doesn't recognise the numbers as actual numbers.

    I have therefore created a new column within excel where I'd like to change the format of these "numbers" to actually be numbers and keep the text fields as they are.

    I've tried to use the formula =VALUE(cell) which works for those that are numbers but returns #VALUE for the text field.

    Example below

    SQL (text) New Column using =VALUE() What I'd like but with the numbers being recognised as numbers
    1 1 1
    2 2 2
    3 3 3
    Yes #VALUE Yes
    No #VALUE No
    4 4 4

    Many thanks

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,387

    Re: Using =VALUE() but getting #VALUE for text

    As explained in the help file (https://support.office.com/en-us/art...c-bc2d3953d8c2 ), if the input text cannot be interpreted as a number, then VALUE() returns the #VALUE error. You will need to nest your VALUE() function inside of some kind of decision function that reflects the exact logic you want. For example, =IFERROR(VALUE(A1),A1) will convert the value of A1 to a number if A1 is a convertable number stored as text, but will simply display the text in A1 if it cannot be converted to a number. (Help file for the IFERROR() function, if needed: https://support.office.com/en-us/art...6-63f3e417f611 ). Or something like =IF(ISNUMBER(VALUE(A1)),VALUE(A1),A1) will test the result of VALUE() to see if it is a number. If so, then it will convert the number as text to number. If not, then it will return the text string.
    Last edited by MrShorty; 04-26-2018 at 12:32 PM.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    12-05-2013
    Location
    Glasgow
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Using =VALUE() but getting #VALUE for text

    Thank you, this works a treat.

+ 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] Need to show text value of highest recurring text based on another text value
    By retroisbest in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-23-2017, 10:23 AM
  2. Replies: 1
    Last Post: 12-17-2015, 03:35 AM
  3. [SOLVED] Need to Mod Code on red text, I have VBA to distinguish Paid(Black Text) Unpaid(Red Text)
    By Garbology in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-11-2014, 07:55 PM
  4. [SOLVED] function IF to return text based if text contains exact text
    By in nomine noctis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2013, 06:25 AM
  5. Replies: 0
    Last Post: 04-22-2013, 12:13 PM
  6. Macro to Parse Text - Import text to Excel from Multiple Text Files & Folders
    By Novice_To_Excel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2012, 01:05 AM
  7. [SOLVED] Use .text from previous text box in form to prefill text in second text box
    By chromachem in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-23-2012, 10:04 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