+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    02-09-2010
    Location
    maryland, maryland
    MS-Off Ver
    Excel 2007
    Posts
    3

    Formula does not do math correctly when text is added

    Ok ill try and explain this the best i can. First off I renamed sheet3 to "Raw Data". Im copying numeric data from another source and pasting it into a cell on this sheet. For example im pasting 751.71 into cell B7 on the "Raw Data" sheet. Then on sheet 1 i am using a formula to take this number and subtract 750. But the catch is I need text in front of the number as well. The text i need is "DF5G + ". Everything works fine in my formula as long as the result of the subtraction is a 2 digit number but in this case where the result is a 1 digit number (not including the digits after the decimal, which should be 2) it doesn't seem to subtract correctly. Here is my formula:

    ="DF5G + " & Sum('Raw Data'!B7-750).

    so 751.71 minus 750 is 1.71 but it says its 1.71000000000004.
    If the raw data was 761.71 it works fine with a 2 digit result 11.71
    Also it the ""DF5G + " & " part isnt in the formula it works but i need this text in front of the result

    Please help. If threre is a solution to this or if there is another way of inserting text and a formula in the same cell please tell. Thanks
    Last edited by corey11820; 02-10-2010 at 09:51 PM.

  2. #2
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    9,508

    Re: Formula does not do math correctly when text is added

    Try

    ="DF5G + " & Fixed('Raw Data'!B7-750)

  3. #3
    Registered User
    Join Date
    02-09-2010
    Location
    maryland, maryland
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Formula does not do math correctly when text is added

    Thanks daddylonglegs. Advice works great

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.2.0