+ Reply to Thread
Results 1 to 3 of 3

Understand what the following code does

  1. #1
    Registered User
    Join Date
    11-08-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    45

    Understand what the following code does

    Hi

    I have the following function for keeping angles on my spread sheet between 0 and 360. I would like to understand the maths behind it?

    Would anyone be able to explain to me what's going on?

    Please Login or Register  to view this content.
    Thanks

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Understand what the following code does

    the =INT(x) function will truncate the number x to an integer (by rounding down)
    so INT(angle/360) will provide the number of times 360 goes into the angle.
    angle-n*360 therefore give the remainder of angle after dividing by 360.

    For what it's worth:
    Please Login or Register  to view this content.
    should do the same thing.

  3. #3
    Registered User
    Join Date
    11-08-2013
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: Understand what the following code does

    Ah I see thanks a million for the explanation

+ 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. Trying to understand a piece of code...
    By DMP1984 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-17-2010, 10:24 AM
  2. Trying to Understand VBA Code....
    By konquistador in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-08-2009, 04:35 PM
  3. Understand code
    By smlaff01 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-15-2007, 04:04 PM
  4. Don't Understand Code
    By miracleblake in forum Excel General
    Replies: 3
    Last Post: 12-08-2005, 04:15 PM
  5. Help me understand this code
    By Carrot in forum Excel General
    Replies: 2
    Last Post: 10-14-2005, 01:07 AM

Tags for this Thread

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