+ Reply to Thread
Results 1 to 9 of 9

math function returning wrong number?

  1. #1
    Forum Contributor
    Join Date
    01-20-2012
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    128

    math function returning wrong number?

    I hope you can see these attachments. in the cells "Drive time one way" it keeps returning "8"? I am trying to get it to round to the nearest number from what it get when it devides "Drive time one way" by "Days Driving One Way". I want it to return "0" if error. What am I doing wrong. It's like the cell is only going to "8" or "0"? temp.pdftemp f2.pdf
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-20-2012
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    128

    Re: math function returning wrong number?

    temp.pdfwoops, here is the other pdf. If anyone would prefer a different format. Please say so.

  3. #3
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: math function returning wrong number?

    Can you upload a sample excel file instead of a PDF? It's hard to follow without row and column labels.

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: math function returning wrong number?

    How about in an Excel format, like .xls or .xlsx

  5. #5
    Forum Contributor
    Join Date
    01-20-2012
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    128

    Re: math function returning wrong number?

    Book2.xlsx Here it is.

  6. #6
    Forum Contributor
    Join Date
    01-20-2012
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    128

    Re: math function returning wrong number?

    You'll have to enter a number in cell "D2" to in order to populate the cells of concern.

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: math function returning wrong number?

    And which are the cells of concern?

    What value are you expecting in those cells of concern?

  8. #8
    Forum Contributor
    Join Date
    01-20-2012
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    128

    Re: math function returning wrong number?

    Book2.xlsx Cells in question are purple. The output is in column "F" I want to devide Column D/E and have it return in F. But it only returns 0 or 8 for some reason.

  9. #9
    Registered User
    Join Date
    06-17-2014
    Location
    Uppsala, Sweden
    MS-Off Ver
    2010
    Posts
    43

    Re: math function returning wrong number?

    No, the math is right, it's the cell formaing that tricks you. In cell D16 and E16 you only show 2 decimals. So the "visible" divison for you is 0,17/0,02 which is not equal to 8 which is the number in F16. But if you increase the number of decimals you will se that 0,17 actually is 0,166667.. and the same with 0,02. So the divison in F16 is correct because excel doesn't round off decimals when calculating formulas.

    And for the other part, you IF-formula in column C only gives two values: 10 or 0, which leads to column F only being able to show value 8 or 0 according to the formulas you have in column D and E.

    Do you understand?
    Last edited by johansoder; 06-30-2014 at 05:41 AM. Reason: Spelling

+ 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] Rows.Count returning wrong number
    By weasel7711 in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 10-25-2012, 01:22 AM
  2. HOUR function returning wrong number
    By milleribsen in forum Excel General
    Replies: 6
    Last Post: 11-04-2011, 02:47 PM
  3. Excel 2007 : Returning wrong value with IF function
    By bdinsdale in forum Excel General
    Replies: 3
    Last Post: 06-27-2011, 03:18 PM
  4. Excel 2007 : IF function returning wrong value
    By bdinsdale in forum Excel General
    Replies: 3
    Last Post: 06-27-2011, 03:00 PM
  5. IRR function is returning the wrong value
    By hackman2007 in forum Excel General
    Replies: 4
    Last Post: 11-07-2008, 11:24 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