+ Reply to Thread
Results 1 to 8 of 8

Converting downloaded data from text to numeric

  1. #1
    Registered User
    Join Date
    10-03-2015
    Location
    London, England
    MS-Off Ver
    Office 2010
    Posts
    4

    Converting downloaded data from text to numeric

    Here are 2 fields downloaded from a service
    Field One Field2
    430.86

    I have copied the fields, the first containing a number but in text format, the second (which may not copy correctly) being blank but I think in text format

    I have tried various combinations of if, isnumber, and value.

    I would like a formula which returns the number if it is a number, or 0 if blank.
    Using Value works if it is a number, but returns #value if not, and I cannot find an isnumber function combined with an if which works with the blank and allows me to return 0

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Converting downloaded data from text to numeric

    Assuming the first "text-number" is in A2, put this in B2 and copy down:

    =IFERROR(A2+0, 0)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,289

    Re: Converting downloaded data from text to numeric

    Multiply everything with 1 and a number with text format becomes a real number
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  4. #4
    Registered User
    Join Date
    10-03-2015
    Location
    London, England
    MS-Off Ver
    Office 2010
    Posts
    4

    Re: Converting downloaded data from text to numeric

    The multiply by 1 is a good idea, and works when there is something in the cell.
    When there is a blank cell in a new spreadsheet, this also works, converting the blank to number 0.

    However the cell which is there as a download from an outside source seems to have
    something different about it. It shows as a blank, but multiply by 1 gives #VALUE!

    I found an answer
    =IF(IFERROR(+VALUE(D9),0),VALUE(D9),0)

    Value(D9)converts the D9 cell to a number.
    if this value is an error, the result is 0.
    If not an error (a number) the result is the number.

    Seems complicated, but it works

    Thanks for help offered.

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Converting downloaded data from text to numeric

    Use Text to Columns

    Select the Column in which you have data
    Then Select Text to Columns under Data
    Then Select Finish button under Convert text to Column Wizard - Step 1 of 3 without selecting any thing
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  6. #6
    Registered User
    Join Date
    10-03-2015
    Location
    London, England
    MS-Off Ver
    Office 2010
    Posts
    4

    Re: Converting downloaded data from text to numeric

    Thanks Sila

    That is the simplest solution.

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Converting downloaded data from text to numeric

    Interesting solution. The formula in post #2 didn't work?

  8. #8
    Registered User
    Join Date
    10-03-2015
    Location
    London, England
    MS-Off Ver
    Office 2010
    Posts
    4

    Re: Converting downloaded data from text to numeric

    My apologies, your method does work.
    When I tried it before I got a reference wrong so though it did not work.

+ 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. Converting downloaded figure to a date
    By dgo in forum Excel General
    Replies: 2
    Last Post: 05-19-2010, 06:22 AM
  2. Converting text to numeric value
    By Lithium78 in forum Excel General
    Replies: 5
    Last Post: 05-17-2010, 09:08 AM
  3. converting downloaded data from columns to rows
    By newdude in forum Excel General
    Replies: 7
    Last Post: 01-07-2009, 06:00 AM
  4. Converting downloaded data (including transpose)
    By tcx in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-06-2008, 09:17 PM
  5. Converting numeric data into 0
    By deepakgoyal in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-26-2006, 10:45 AM
  6. converting text to numeric data
    By babooz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-19-2006, 03:20 AM
  7. [SOLVED] Converting variable text strings to numeric
    By Richgard53 in forum Excel General
    Replies: 1
    Last Post: 07-13-2005, 02:05 AM
  8. [SOLVED] Converting Text into a Numeric Value and Totalling
    By Shazbut in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-10-2005, 01:07 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