+ Reply to Thread
Results 1 to 6 of 6

Convert tekst to data for calculation

  1. #1
    Registered User
    Join Date
    03-04-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    5

    Convert tekst to data for calculation

    Hello,

    I'm wondering whether it's possible in excel to split the contents of one cell into other cells so it can be used for calculations.

    Input:
    40.718119,-74.006653 (Longitude and Lattitude)

    How i need to make it for the calculations to work:
    Output 1
    40,718119

    Output 2
    -74,006653

    (dot's to comma's, splitting the two numbers up and getting rid of the devider comma)

    Is this possible in any way to do this with a function?

    Kind Regards,

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Convert tekst to data for calculation

    With
    A1: a long,lat value.....40.718119,-74.006653

    These regular formulas parse that value into long and lat, replacing decimals with commas
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In the above example, these are the returned values:
    40.718119
    -74.006653

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    03-04-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Convert tekst to data for calculation

    I've tried those exact codes out and they return errors, for one i need to use ";" 's to seperate the function rules. But even then still it doesn't work i tried to just cut the formula up in pieces and see where it goes south, and it seems to be the FIND function, possibly in conjuction with the LEFT function, because i wasn't sure how the "A1)-1)" part would work.

    The substitute function is awesome though, thanks for pointing that one out to me

  4. #4
    Valued Forum Contributor
    Join Date
    07-29-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2003/Excel 2010
    Posts
    534

    Re: Convert tekst to data for calculation

    Maybe like this:
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-04-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Convert tekst to data for calculation

    that works perfectly! thanks man!

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Convert tekst to data for calculation

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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