+ Reply to Thread
Results 1 to 6 of 6

MOD function "feature"

  1. #1
    Registered User
    Join Date
    01-30-2017
    Location
    Norman, Oklahoma, US
    MS-Off Ver
    Samsung Tab Pro 12.3 inch tablet w/ Android Office suite App Polaris
    Posts
    4

    MOD function "feature"

    Greets- Ran into strange bogosity w/MOD function where MOD (N,12) where 12 divides evenly into N w/no remainder gives a result of 12. ?? Should B 0. Any1 run into this B4? On a Samsung Tab Pro 12.3 inch tablet w/Android running office suite app Polarus. Recent Android update but MOD function results the same B4 & after update. WTF?

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: MOD function "feature"

    Quote Originally Posted by quisizyx View Post
    MOD (N,12) where 12 divides evenly into N w/no remainder gives a result of 12.
    Tell us what N is.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: MOD function "feature"

    Try to read here: MOD()

  4. #4
    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,941

    Re: MOD function "feature"

    Quisizyx - why did you report your post?
    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.

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

    Re: MOD function "feature"

    To expand on Tony Valko's comment, I suspect that n is not an exact multiple of 12, but something slightly less than. For example, I put 11.999999999999 into a cell (it displayed as 12) and entered =MOD(A1,12) and the result was 12. Format to show all 15 digits, and the actual result is 11.999999999999, which will frequently display as 12. Because Excel's calculations are all in double precision, if N is the result of some other calculation, it would be easy for N to be 12*k-1ppt. Since Excel's MOD() function does not adjust N at all (some programming languages like VBA will round N to the nearest integer before performing the mod operation), it is easy for round off error to make something that we think should be 0 come out as 12.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    01-30-2017
    Location
    Norman, Oklahoma, US
    MS-Off Ver
    Samsung Tab Pro 12.3 inch tablet w/ Android Office suite App Polaris
    Posts
    4

    Re: MOD function "feature"

    Greets- Ok, this is interesting. I originally posted on MrExcel forum. Had trouble posting so decided to try this forum. To my surprise I find my original post here w/responses I have not seen. Plus my MrExcel login works here. The value of N is listed in the MrExcel forum along w/several tests trying to find the trigger for the floating point issue Excel has. The MOD(ROUND(N,2),12) seems to work for the remaining inches column after the feet are derived from the total inches. N = 33012. Should give a result in feet of 2751 but gives 2750. Will study responses here then continue later. Now to see if this forum gives the seem issue on posting I was having on MrExcel.

+ 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. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  2. [SOLVED] Activate "sorting" feature when worksheets are setup to "password protect" itself
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-26-2012, 09:04 PM
  3. Replies: 1
    Last Post: 06-21-2012, 06:21 AM
  4. Fill/drag feature as an Excel function? Or, a *relative* "=" function?
    By milky1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-15-2011, 03:51 PM
  5. [SOLVED] "Show Placeholder" feature in options/view doesnt work
    By in forum Excel General
    Replies: 1
    Last Post: 01-07-2006, 11:10 AM
  6. [SOLVED] "Show Placeholder" feature in options/view doesnt work
    By in forum Excel General
    Replies: 0
    Last Post: 01-05-2006, 10:50 PM
  7. "Show Placeholder" feature in options/view doesnt work
    By in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-05-2006, 10:50 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