+ Reply to Thread
Results 1 to 6 of 6

Error when subtracting cells

  1. #1
    Forum Contributor
    Join Date
    02-06-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    112

    Error when subtracting cells

    Hello All,
    I copied some data from online and what to simply subtract T4 - K4 where K4 is data I copied online.
    I keep getting an error and cannot figure out why.

    Regards,
    Andrew
    Attached Files Attached Files
    Last edited by lemonap618; 04-12-2021 at 03:25 PM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Error when subtracting cells

    Probably the 'numbers' are, in fact, text. But, sadly, my crystal ball is away for servicing, so unless you provide a sample workbook showing the issue, we'll never know.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Error when subtracting cells

    Difficult for any of us to know too, given the information provided. Maybe the data copied from "online" is being seen as text. Or, quite often, data from online sources has non-breaking spaces at the end of the data.

    You're probably going to need to post a sample workbook. See the yellow banner at the top of the page.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Error when subtracting cells

    With the addition of the sample file, it can be seen that the values in column K are all "numbers stored as text". While you are at it, note that columns F, G, H, I, and J are also numbers/dates stored as text -- in case you would like to also address those columns while you are at it.

    Excel strategies for converting numbers stored as text to numbers: https://support.microsoft.com/en-us/...rs=en-us&ad=us Note that spreadsheets tend to use your operating system's regional settings for interpreting dates. The text dates in the file look like MDY dates, so my system will probably have no trouble correctly interpreting those dates, but your system may have trouble if it is looking for DMY or other date format.

    I also observe that, if I open the sample file in LO Calc, that LO Calc automatically deals with the numbers stored as text and performs the subtraction without error.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Error when subtracting cells

    In column K the commas and dollar signs are not coming from formatting, and there are non-printing characters, CHAR(160), in the cell too, so the values aren't really numeric.
    Last edited by Norie; 04-12-2021 at 03:58 PM.
    If posting code please use code tags, see here.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: Error when subtracting cells

    ... and there are non-printing characters, CHAR(160), in the cell too ...
    Good to know we can guess with the best ... 😉.

+ 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. Random calculation error with adding and subtracting times
    By randywombat in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-17-2020, 05:17 AM
  2. [SOLVED] Get rid of error message while subtracting two times
    By chriswrcg in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-06-2019, 10:16 AM
  3. Problems with subtracting and #value error
    By tessda in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-10-2017, 04:17 AM
  4. [SOLVED] Precision error while adding or subtracting values in excel.
    By alokmpatel in forum Excel General
    Replies: 2
    Last Post: 11-19-2015, 06:38 AM
  5. Error When Subtracting on Excel
    By funwithcolors in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-21-2014, 04:37 PM
  6. Replies: 0
    Last Post: 05-08-2012, 12:42 PM
  7. [SOLVED] Rounding Error when adding or subtracting two cells
    By mtheo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-28-2006, 02:55 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