+ Reply to Thread
Results 1 to 14 of 14

Convert hour/minute to another predefined time mode.

  1. #1
    Forum Contributor
    Join Date
    02-27-2009
    Location
    Chennai, India
    MS-Off Ver
    Excel 2013
    Posts
    327

    Convert hour/minute to another predefined time mode.

    Here is a traditional Indian time calculation

    (1 day) 24 Hr = 60 N
    1 N = 60 V = 24 Minutes

    How to formulate this in excel 2003.

    If A1= HH (hour), B1=mm (minutes) - Inputs
    A2 should show NN : B2 should show VV - Result

    And Viceversa.

    If A1= NN (hour), B1=VV (minutes) - Inputs
    A2 should show hh : B2 should show mm - Result

    ------------

    hh - hours, mm - minutes, NN - Nazhigai, VV - Vinadi - all are numbers
    Last edited by jilaba; 03-03-2009 at 11:02 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Need help to do the following calculation

    Please change your thread title to something more appropriate to your question, generic titles "Need Help" etc are not permitted.

    Once revised we will be able to provide assistance.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Convert hour/minute to another predefined time mode.

    Thanks for changing your title.

    You don't specify if the entries in A1 & B1 are in time format or just general integer values... assuming the later... ie 10 is entered in A1 to represent 10 Hours and 30 in B1 to represent 30 minutes:

    A2 for N: A1*(24/60)
    B2 for V: B1/24

    (this assumes Minutes in B1 would never exceed 60...)

    To reverse do the opposite, ie / in A2 and * in B2

    A2 for H: A1/(24/60)
    B2 for M: B1*24

    Does that help ?

  4. #4
    Forum Contributor
    Join Date
    02-27-2009
    Location
    Chennai, India
    MS-Off Ver
    Excel 2013
    Posts
    327

    Re: Convert hour/minute to another predefined time mode.

    Thanks.

    All values are integers. Sorry, your method is not working.

    Below is a short explann.

    10 Hours : 52 Minutes >>>>> 27 : 10 (NN:VV)

    10 hours * 2 1/2 = 25 N
    52 min * 2 1/2 = 130 V (since 60 v = 1 N, 130 = 2 N : 10 V)
    So, (25N + 2N) : 10V = 27N : 10V is Result.

    The reverse calculation is.......

    27 : 10 (NN:VV) >>>>> 10 Hours 52 Minutes

    27*24 = 648 minutes = 10 Hours : 48 Minutes
    10 VV = 4 minutes (60vv=24minutes)
    So, 10 Hour : 48+4 mins = 10 Hr : 52 minutes is result.

    Hope, this will be clear. To simply say, this uses the following...

    24 Hour = 60 NN
    1 hour = 2 1/2 NN
    1 NN = 60vv

    Like in clock, if it exceeds, 60 mins, another hour is counted, it works.

    ........

    Quote Originally Posted by DonkeyOte View Post
    Thanks for changing your title.

    You don't specify if the entries in A1 & B1 are in time format or just general integer values... assuming the later... ie 10 is entered in A1 to represent 10 Hours and 30 in B1 to represent 30 minutes:

    A2 for N: A1*(24/60)
    B2 for V: B1/24

    (this assumes Minutes in B1 would never exceed 60...)

    To reverse do the opposite, ie / in A2 and * in B2

    A2 for H: A1/(24/60)
    B2 for M: B1*24

    Does that help ?

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Convert hour/minute to another predefined time mode.

    This is the part I don't get...

    52 min * 2 1/2 = 130 V (since 60 v = 1 N, 130 = 2 N : 10 V)
    Previously you said 24 min = 1V ... in which case 52 min = 2.17 V ... or another way if you assume 1N = 2.5 hr then 52 min is equivalent to 0.87 N ...

    Q: Where are getting 130 V from ?? how can this equate to > 2N ?

    Re: to get the Hours to N (10 -> 25) - my mistake, the formula should of course be either one of:

    =A1/(24/60)

    or

    =A1*(60/24)

    Whichever is preferred.

    I'm still confused about your V calc.

  6. #6
    Forum Contributor
    Join Date
    02-27-2009
    Location
    Chennai, India
    MS-Off Ver
    Excel 2013
    Posts
    327

    Re: Convert hour/minute to another predefined time mode.

    Sorry, I made a mistake in the first post.

    This is correct : 24 Min = 1 N = 60 V

    >>Q: Where are getting 130 V from ?? how can this equate to > 2N ?<<

    52 min = 2 N : 10 V
    52*2 1/2 = 130 (52*2.5)
    130/60 = 2.1666, Here 2 is NN and the balance .1666*60 = 10

    Or

    52/24 = 2.1666666 - Here 2 is NN & balance .1666*60 = 10


    Hope, you will understand now. I think i corrected my mistakes, letus see.

    Thanks.


    Quote Originally Posted by DonkeyOte View Post
    This is the part I don't get...



    Previously you said 24 min = 1V ... in which case 52 min = 2.17 V ... or another way if you assume 1N = 2.5 hr then 52 min is equivalent to 0.87 N ...

    Q: Where are getting 130 V from ?? how can this equate to > 2N ?

    Re: to get the Hours to N (10 -> 25) - my mistake, the formula should of course be either one of:

    =A1/(24/60)

    or

    =A1*(60/24)

    Whichever is preferred.

    I'm still confused about your V calc.

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Convert hour/minute to another predefined time mode.

    OK so to confirm... looking at Hours (A1) & Mins (B1) to N (A2) & V (B2)

    A1: 10
    B1: 52

    A2: =(A1/(24/60))+INT(B1/24)
    B2: =60*(MOD(B1/24),1)

  8. #8
    Forum Contributor
    Join Date
    02-27-2009
    Location
    Chennai, India
    MS-Off Ver
    Excel 2013
    Posts
    327

    Re: Convert hour/minute to another predefined time mode.

    With 10Hr52Min, formula for A2 is fine.
    B2 has little correction B2=60*MOD((b1/24),1) works fine.

    BUT........... Just when i tried with someother timing, it goes wrong.

    For instance :

    17 Hr 38 Mins : Result should be 44-05 (NN-VV)
    But here i get result of 43.5 - 35.

    Here 43.5 is actually ......... (.50=30v)

    43 N : 30 V & 35 V
    Since 1 N = 60 V.......
    30v + 35v = 65v = 1 N : 05 - this 1 N should be added to 43 N
    so the result is 44-05

    think, you will curse me


    Quote Originally Posted by DonkeyOte View Post
    OK so to confirm... looking at Hours (A1) & Mins (B1) to N (A2) & V (B2)

    A1: 10
    B1: 52

    A2: =(A1/(24/60))+INT(B1/24)
    B2: =60*(MOD(B1/24),1)

  9. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Convert hour/minute to another predefined time mode.

    So

    A2: =INT(((($A1*(60/24))*60)+($B1*(60/24)))/60)
    B2: =60*(MOD(((($A1*(60/24))*60)+($B1*(60/24)))/60,1))

    Is that correct ?

  10. #10
    Forum Contributor
    Join Date
    02-27-2009
    Location
    Chennai, India
    MS-Off Ver
    Excel 2013
    Posts
    327

    Re: Convert hour/minute to another predefined time mode.

    Greatttttttt........

    I was breaking my head since a week. I was using vlookup to grab the result from two long tables (hour>NN:vv & Mins >NN:VV).

    I think i can solve the viceversa formula (NN:VV to Hr:Mm), if unable, will reach you back.

    Thanks a lot for the formula.

  11. #11
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Convert hour/minute to another predefined time mode.

    Your welcome though I suspect that one of the math guys here can provide a more efficient/elegant solution.

    Re: working in reverse, perhaps:

    Hours: =INT($A$1*(24/60))
    Mins: =60*MOD($A$1*(24/60),1)+(($B$1/60)*24)

    Where A1 holds N and B1 holds V

  12. #12
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Convert hour/minute to another predefined time mode.

    Having thought about it more you could simplify the Hours (A1) & Mins (B1) to N & V using:

    A1: =INT(($A1&":"&$B1)/"00:24")
    B1: =MOD(($A1&":"&$B1)/"00:24",1)*60

    ie create a time value using A1 & B1 divide by 24 mins and take the Integer of the result to get N ... take the remainder and * 60 to get the V

  13. #13
    Forum Contributor
    Join Date
    02-27-2009
    Location
    Chennai, India
    MS-Off Ver
    Excel 2013
    Posts
    327

    Re: Convert hour/minute to another predefined time mode.

    Oh... Thanks. This is a very elegant solution, i found. I am very poor in maths.
    .......

    Quote Originally Posted by DonkeyOte View Post
    Your welcome though I suspect that one of the math guys here can provide a more efficient/elegant solution.

    Re: working in reverse, perhaps:

    Hours: =INT($A$1*(24/60))
    Mins: =60*MOD($A$1*(24/60),1)+(($B$1/60)*24)

    Where A1 holds N and B1 holds V

  14. #14
    Registered User
    Join Date
    04-06-2013
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    13

    Re: Convert hour/minute to another predefined time mode.

    Hi,

    Also,

    Pl. provide the formula to find the seconds as well.

    Hours: =INT($A$1*(24/60))
    Mins: =60*MOD($A$1*(24/60),1)+(($B$1/60)*24)
    Sec=?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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