+ Reply to Thread
Results 1 to 2 of 2

drop the whole number and leave the decimal part of the number for calculations

Hybrid View

  1. #1
    Registered User
    Join Date
    02-09-2013
    Location
    Edmonton AB
    MS-Off Ver
    Excel 2003
    Posts
    1

    drop the whole number and leave the decimal part of the number for calculations

    How can I drop the whole number part of a number and leaving only the decimal part of the number. Then multiply the decimal part of the number with a number. Then repeat this in a sequence.
    The object is to convert Lat and Long decimals to Hr. Min. Sec.
    eg. 53.535663 .535663*60=32.13978 .13978*60=8 53 32 8
    eg. 113.352640 .352640*60=21.1584 .1584*60=9 113 21 9
    eg. 113.306579 .306579*60=18.39474 .39474*60=23 113 18 23

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: drop the whole number and leave the decimal part of the number for calculations

    i dont get how you get the last part
    =MOD(A1,1)=0.535663
    MOD(A1,1)*60 = 32.13978
    =MOD(MOD(A1,1)*60,1)= 0.13978
    =MOD(MOD(A$1,1)*60,1)*60 =8.3868
    shouldn't it be degree mins seconds using this method
    The whole units of degrees will remain the same (i.e. in 121.135° longitude, start with 121°).
    Multiply the decimal by 60 (i.e. .135 * 60 = 8.1).
    The whole number becomes the minutes (8').
    Take the remaining decimal and multiply by 60. (i.e. .1 * 60 = 6).
    The resulting number becomes the seconds (6"). Seconds can remain as a decimal.
    Take your three sets of numbers and put them together, using the symbols for degrees (°), minutes (‘), and seconds (") (i.e. 121°8'6" )

    =INT(A1)&" degrees "&INT(MOD(A1,1)*60)&" mins "&MOD(MOD(A1,1)*60,1)*60&" seconds"
    or rounding down
    =INT(A1)&" degrees "&INT(MOD(A1,1)*60)&" mins "&ROUNDDOWN(MOD(MOD(A1,1)*60,1)*60,0)&" seconds"
    or just put each bit in a seperate cel
    eg
    b1=INT(A1)
    c1=INT(MOD(A1,1)*60)
    d1=MOD(MOD(A1,1)*60,1)*60
    Last edited by martindwilson; 02-09-2013 at 11:21 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ Reply to Thread

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.6.0 RC 1