+ Reply to Thread
Results 1 to 4 of 4

make a chnge

  1. #1
    Registered User
    Join Date
    06-29-2022
    Location
    Canada
    MS-Off Ver
    2021
    Posts
    38

    make a chnge

    Hi,

    I have
    Last edited by aslam5420; 07-10-2022 at 10:02 AM.

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Want to make a chnge in =ROUND(MOD(D4,1)*60*24,0) formula

    In E4 then copy down
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  3. #3
    Registered User
    Join Date
    06-29-2022
    Location
    Canada
    MS-Off Ver
    2021
    Posts
    38

    Re: Want to make a chnge in =ROUND(MOD(D4,1)*60*24,0) formula

    Thank you so much it worked

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

    Re: Want to make a chnge in =ROUND(MOD(D4,1)*60*24,0) formula

    It appears that the "expected results" column is simply a count of the number of 30 second increments that have elapsed. Sometimes the difficult part of this sort of thing is defining the exact boundary where the result shifts from 0 to 1 to 2 to 3 etc. Your written description, for example, led me to believe that exactly 30 seconds would be a 1, exactly 1 minute would be 2, 1:30 would be 3, and so on, but your "expected results" column shows a 1 next to 1:00, and a 2 next to 1:30, and so on. For now, I'll assume that the "expected results" column is correct.

    Modifications to the existing formula in column E:

    1) I notice that the formula in column D strips all seconds information from column C. Since your desired result depends on the seconds information, the first change is to reference column C rather than column D =ROUND(MOD(C4,1)*60*24,0)
    2) The current formula is set up to use time in minutes since midnight, and the goal of the formula is to get the number of 0.5 minute increments that have passed, so we divide the time in minutes by 0.5 to get the number of half minute increments =ROUND(MOD(C4,1)*60*24/0.5,0)
    3) Now we need to round that result down to the nearest integer, so replace the ROUND() function with the ROUNDDOWN() function. =ROUNDDOWN(MOD(C4,1)*60*24/0.5,0) This would work just fine if you want 0.5 minutes to be 1 and 1.0 minutes to be 2.
    4) Since your expected results shows 1.0 to be 1 and 1.5 to be 2 and so on, we need to subtract a small amount from the result before rounding down to properly account for the boundary value. Since the raw data are given to the nearest 0.01 seconds (0.00017 minutes), I choose to subtract about half of that value =ROUNDDOWN(MOD(C4,1)*60*24/0.5-0.00008,0)

    That should replicate your expected results column.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

+ 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. Formula to make dollar amounts a round number for payments
    By C.j. in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-29-2015, 02:11 PM
  2. How to Make the amount round off Automatically?
    By ksbharath86 in forum Excel General
    Replies: 4
    Last Post: 10-27-2014, 04:07 AM
  3. [SOLVED] How to make excel not round up??
    By BenCrockett in forum Excel General
    Replies: 6
    Last Post: 08-20-2014, 03:02 PM
  4. [SOLVED] Round a value and make it a whole number
    By swagatam2014 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-19-2013, 02:18 AM
  5. Make a number round at a certain point
    By mizzou852 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-01-2013, 06:24 PM
  6. value corresponding chnge
    By sandy2011 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2012, 11:46 AM
  7. how to make round with if formula
    By nasser in forum Excel General
    Replies: 2
    Last Post: 04-12-2010, 04:57 PM

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